-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Alerts #67
Comments
GitHub looks at the textual meaning of the blockquote content. It works fine with escaped > \[!NOTE]
> Useful information that users should know, even when skimming content. yields: Note Useful information that users should know, even when skimming content. > [!NOTE]
> Useful information that users should know, even when skimming content.
[!note]: https://example.com yields:
|
Thanks for taking the time to reply to my issue! 🙏 Update: It actually does work using the backslash, although it seems to me like it is not the format they recommend to be used. |
> [!NOTE]
Some note
[!note]: https://example.com Yields:
|
I am not sure our projects here should change —— GH made a new format that interferes with references/definitions. We consider those references/definitions too. That’s why they get escaped |
@wooorm, well if the package name includes That said, I see that here the GFM spec is only
Does it interfere? This new feature has a strict format ( |
As you found out, notes aren’t GFM.
Yep, I just showed that: #67 (comment)
They’re loose enough to allow that escaped |
You might enjoy this example: <blockquote>
<p>[!NOTE]
asd</p>
</blockquote> Note asd |
Okay, @wooorm, thanks for your time. 🙏 Indeed it works as expected even with
When I write Markdown, I prefer not inserting HTML code unless there is a big requirement to do so. However, thanks for sharing this! 🙏 Feel free to close this issue. 😉 |
ok, closing! 👍
Right right! No, I meant to show this as it illustrtrates how GH works! They also accept this HTML. They don’t give a hoot about the original markdown of the |
Initial checklist
Problem
The Alerts feature is not properly parsed ATM.
The issue is that
> [!NOTE]
is converted to> \[!NOTE]
([
is escaped) which is an invalid Alert syntax.Here are all possible alert types currently supported by GFM:
Solution
> [!NOTE]
(and other alert types) should be left intact.Alternatives
Of course, can remove the backslashes using
String(file).replace(/^> \\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*$/gm, '> [!$1]')
, however, I thinkremark-gfm
should support this out of box. 😉The text was updated successfully, but these errors were encountered: