peerigon/markdown-loader

Hash links with "&" are not converted the same way as github links

tannerlinsley opened this issue · 2 comments

On github markdown, a header like this one:

This & That Section

will write out an id like this: this--that-section

On markdown-loader, it writes out this-that-section

This breaks links that adhere to github markdowns syntax:

[This & That Section](#this--that-section)
meaku commented

Thanks for reporting @tannerlinsley. markdown-loader relies on marked for generating HTML. According to the marked docs, gfm is enabled by default.

Example

const marked = require("marked");

marked("# This & That Section");
// => '<h1 id="this-that-section">This &amp; That Section</h1>\n'`

Can you file this issue on the marked repository?