Closed
Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
** English is not very good **
try change option config.js
to be: markdown.extractHeaders:["h1", "h2", "h3"]
, on Post page, try to get this.$page.headers
still return h2 and h3
and I changed the file: node_modules/@vuepress/core/lib/node/Page.js
line117:
const headers = extractHeaders(
this._strippedContent,
['h1','h2', 'h3'], // add 'h1' to here.
markdown
)
it worked.
so, I think markdown.extractHeaders
option does not work.
What is expected?
on post page, get this.$page.headers
includes h1
level
What is actually happening?
Other relevant information
"vuepress": "^1.2.0"
in Chinese:
制作主题时候,想通过设置makdown.extractHeaders
, 来 this.$page.headers
获取到所有的heading 标签,感觉是硬解码写成固定的了,配置的选项也不生效。
Metadata
Metadata
Assignees
Labels
No labels