11ty / eleventy-plugin-syntaxhighlight

A pack of Eleventy plugins for syntax highlighting in Markdown, Liquid, and Nunjucks templates.
https://www.11ty.dev/docs/plugins/syntaxhighlight/
MIT License
129 stars 32 forks source link

Fix table rendering when lines are highlighted #23

Closed pborenstein closed 12 months ago

pborenstein commented 4 years ago

Because of the way Prism renders Markdown tables, things get screwed up because the plugin expects that a \n ends the table line, so the markup wrappers end up in a strange place. Without highlighting, things look good, but with highlights, the spacing is all weird.

Screen Shot 2020-05-09 at 10 24 41 PM

After hacking the Prism output a tad, things are better. We change <\/span>\n<\/span> to </span></span>\n

Screen Shot 2020-05-09 at 10 26 43 PM