Remark parses <svelte:head>
as a link
#1308
-
Hi 👋 These get parsed as a link:
And these don't:
Is there a reason for this? I mean, is it a valid thing to parse something that starts with If it doesn't hurt the current valid behavior of Markdown, it would be great to get it parsed as html. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @babakfp! The characters According to the specification, a URI autolink must start with The examples you provided that get parsed as links ( On the other hand, the examples that don't get parsed as links ( Regarding your question about parsing these as HTML, the specification doesn't mention parsing arbitrary strings within |
Beta Was this translation helpful? Give feedback.
Hey @babakfp!
We follow the autolink rules commonmark https://spec.commonmark.org/0.31.2/#autolinks
The characters
<
and>
are used in Markdown to define autolinks, which are absolute URIs and email addresses enclosed within those characters. The specification defines the rules for what qualifies as a valid autolink.According to the specification, a URI autolink must start with
<
, followed by an absolute URI (a scheme, colon, and then characters other than ASCII control characters, space,<
, and>
) and end with>
. Similarly, an email autolink must start with<
, followed by an email address (matching a specific regex pattern), and end with>
.The examples you provided that get parsed as …