Do not add the `language-` prefix when the info string already starts with `language-` · Issue #277 · commonmark/commonmark.js · GitHub
More Web Proxy on the site http://driver.im/
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
commonmark.js adds a language- prefix to the info string provided after the opening code fence, regardless if it already starts with language-.
Could commonmark.js not adding the language- prefix in this case to allow using the language- prefix in the source whitout resulting in language-language-infostring in html?
The changes include changes to spec.txt, so we'd need to do a new release of the spec as well. Should probably do that, but this is just to let you know why it isn't a trivial thing.
commonmark.js adds a
language-
prefix to the info string provided after the opening code fence, regardless if it already starts withlanguage-
.Could commonmark.js not adding the
language-
prefix in this case to allow using thelanguage-
prefix in the source whitout resulting inlanguage-language-infostring
in html?E.g., using the following source:
We get the following result:
The commonmark spec currently says that it "does not mandate any particular treatment of the info string". A
language-
prefix is added in example 142.With
pandoc --from commonmark --to html5 --no-highlight
, we get:The text was updated successfully, but these errors were encountered: