0

I'm using Gulp + Gulpsmith + Metalsmith to create my website.

metalsmith_markdown is rendering my HTML as follows:

# This is an H1 to <h1 id="this-is-an-h1">This is an H1</h1>. Why is it rendering that 'id' tag?

Why might that be?

Here's the part that deals with the markdown rendering in my Gulpfile.js

.use(markdown({
    gfm: true,
    tables: true,
    breaks: false,
    pedantic: false,
    sanitize: true,
    smartLists: true,
    smartypants: true
}))
4

1 回答 1

1

这是metalsmith-markdown的行为,它自PR#181以来使用标记Markdown解析器。

您可以覆盖他们的自述文件和#420中所述的标记的某些功能,但由于所有功能都由metalsmith插件处理,因此您不能真正做到。

我建议在标记中创建一个 PR 以添加一个自定义选项以完全停用此附近的行为

于 2014-10-16T19:39:07.470 回答