You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, what is the official way to escape angled brackets? To me, it seems like <tag\> works the best with mkdocs but escaping all the brackets like \<tag\> makes the most sense. Check out my example code below with associated screenshot, and the markdown contents pasted directly into this post. Here is a brief summary of my findings.
ID
Option
Works in VS Code?
GitHub?
Mkdocs?
1
<tag>
No
No
No
2
\<tag>
Yes
Yes
No (renders \)
3
<tag\>
Yes
Yes
Yes
4
\<tag\>
Yes
Yes
Sort of (renders \<tag>)
Proposed Solution
I have 2 ideas here.
Simply check if any < or > character is preceded by a \ and make sure it is properly escaped.
Add a config option that when turned on, converts all instances of \< and \> to the HTML entities, > and <
I discovered this because of my workflow using typedoc2md/typedoc-plugin-markdown#564 and realized that the behavior of mkdocs doesn't match that of standard markdown editors.
Problem
Escaping angled brackets sometimes shows
\
Description
Hi, what is the official way to escape angled brackets? To me, it seems like
<tag\>
works the best withmkdocs
but escaping all the brackets like\<tag\>
makes the most sense. Check out my example code below with associated screenshot, and the markdown contents pasted directly into this post. Here is a brief summary of my findings.<tag>
\<tag>
\
)<tag\>
\<tag\>
\<tag>
)Proposed Solution
I have 2 ideas here.
<
or>
character is preceded by a\
and make sure it is properly escaped.\<
and\>
to the HTML entities,>
and<
References
Raw Markdown:
Mkdocs Markdown:
VS Code Markdown:
GitHub Markdown:
1 1
2 <tag> 2
3 <tag> 3
4 <tag> 4
The text was updated successfully, but these errors were encountered: