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
What did you do? Please include the actual source code causing the issue.
There are instances where part of the header text that is enclosed within "<>".
Referring to such headings using hrefs is not straightforward.
For example, the heading -
Specifying Variables in an <include>
will have to be linked using the following href - #specifying-variables-in-an-and-lt-include-and-gt
What did you expect to happen?
The href should be #specifying-variables-in-an-include
What actually happened? Please include the actual, raw output.
The href was #specifying-variables-in-an-and-lt-include-and-gt, as the string passed as input to slugify is Specifying variables in an < include >
There are a couple of instances in the user guide where linking such headers is broken (this is the correct link).
Suggested Fix(es)
For this particular case, I have tried removing the "[-]?and-lt" and "[-]?and-gt" substrings from the slugified text like so -
The slugify package actually erases < and > by default.
The issue here is that markdown-it escapes < and > into </gt; before it is passed to htmlparser2, which slugify converts to and-lt/and-gt.
The first h1 here is from a markdown heading, the second from a normal <h1> tag
Tell us about your environment
What did you do? Please include the actual source code causing the issue.
There are instances where part of the header text that is enclosed within "<>".
Referring to such headings using hrefs is not straightforward.
For example, the heading -
Specifying Variables in an
<include>
will have to be linked using the following href -
#specifying-variables-in-an-and-lt-include-and-gt
What did you expect to happen?
The href should be
#specifying-variables-in-an-include
What actually happened? Please include the actual, raw output.
The href was
#specifying-variables-in-an-and-lt-include-and-gt
, as the string passed as input to slugify isSpecifying variables in an < include >
There are a couple of instances in the user guide where linking such headers is broken (this is the correct link).
Suggested Fix(es)
For this particular case, I have tried removing the "[-]?and-lt" and "[-]?and-gt" substrings from the slugified text like so -
The text was updated successfully, but these errors were encountered: