fix: auto header config heading generate func by Koooooo-7 · Pull Request #2474 · docsifyjs/docsify

Summary

For docsify autoHeader config, there is a separately call to renderer of marked.
Fix the autoHeader's heading marked adaption function and add test case for this.

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?

Yes
No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge