npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 72 forks source link

SVG in headers #423

Closed e-oj closed 6 years ago

e-oj commented 6 years ago

Why are svg tags generated in headers? is there a way to turn this behavior off? It leads to a lot of unnecessary white space in the browser.

revin commented 6 years ago

Hey @e-oj, how's it going? Thanks for asking!

Marky's goal is to be a JavaScript implementation of the renderer used by GitHub for markdown documents. Since GitHub renders those SVG icons in headers (it's the link icon that shows up when you hover the mouse cursor over the heading text), we do the same.

If you don't need them for your use case, this behavior is configurable. Pass enableHeadingLinkIcons: false in the options when rendering your document, and it turns this feature off.

Cheers! 🎉

e-oj commented 6 years ago

Cool. thanks. 👍 👍