fix: parse heading error by sy-records · Pull Request #2526 · docsifyjs/docsify

Summary

see https://github.com/markedjs/marked/blob/master/src/Renderer.ts#L53

Fix:

https://docsify-preview.vercel.app/preview/#/zh-cn/

marked.esm.js:21 Uncaught (in promise) Error: Token with "link" type was not found.
Please report this to https://github.com/markedjs/marked.
    at ne.parse (marked.esm.js:21:1)
    at Object.heading (markdown-to-txt.js:62:25)
    at ne.parse (marked.esm.js:21:1)
    at parse (marked.esm.js:21:1)
    at Object.parse (marked.esm.js:15:21)
    at Function.oe [as parse] (marked.esm.js:15:21)
    at de (markdown-to-txt.js:191:28)
    at search.js:154:36
    at Array.forEach (<anonymous>)
    at search.js:109:10

Related issue, if any:

What kind of change does this PR introduce?

Bugfix

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

No

Yes
No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge