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
{{ message }}
Repository navigation
Whitespace in fenced code info string breaks rendering #1314
When there is whitespace in the info string of a fenced code block, like so:
```html foo
...the block is not parsed as a code block. It appears to be rendered as a paragraph:
<p>```html foo</p>
To Reproduce
Steps to reproduce the behavior:
Add a whitespace character in the info string of a fenced code block.
Render with the default renderer.
Expected behavior
When there is whitespace in the info string, GFM appears to use the first word as the language and ignore the rest. (As demonstrated here) I would expect Marked to do the same by default and pass the entire info string to a custom renderer.
Activity
camwiegert commentedon Aug 1, 2018
For reference, here is the GFM spec on info strings.
UziTech commentedon Aug 1, 2018
comfirmed
common mark spec example #112
Feder1co5oave commentedon Dec 10, 2018
#1387 returns this:
which seems correct
camwiegert commentedon Dec 10, 2018
Thanks for addressing this! 😄