feat(toc_obj): Support unnumbered headings#269
feat(toc_obj): Support unnumbered headings#269yoshinorin merged 5 commits intohexojs:masterfrom Cerallin:master
Conversation
yoshinorin
left a comment
There was a problem hiding this comment.
@Cerallin
Would you please update README?
https://github.com/hexojs/hexo-util/tree/ab5ad9dd906f865faeba846b92be9dcce8c27120#tocobjstr-options
P.S: no need force-push. we will squash-merge.
yoshinorin
left a comment
There was a problem hiding this comment.
@Cerallin
Would you please fix lint?
|
@Cerallin Do you have any idea to use this option with other renderers? Currently, hexo-renderer-marked and hexo-renderer-markdown-it don't have an option to add custom attributes. They are the official renderer of hexo. IMHO, it is better to use this option with official renderers. If difficult to implement it, would you please update the docs that users need to customize (extends) the renderer by themselves to add an attributes. I assume users will be confused "this option can be used in official renderers by default". @SukkaW |
|
@yoshinorin |
|
Support for |
* feat(toc_obj): Support unnumbered headings * Update readme * Rollback TOC * Fix typo * Fix lint
* feat(toc_obj): Support unnumbered headings * Update readme * Rollback TOC * Fix typo * Fix lint
* feat(toc_obj): Support unnumbered headings * Update readme * Rollback TOC * Fix typo * Fix lint
* feat(toc_obj): Support unnumbered headings * Update readme * Rollback TOC * Fix typo * Fix lint
* feat(toc_obj): Support unnumbered headings * Update readme * Rollback TOC * Fix typo * Fix lint
This PR adds a feature for unnumbered headings.
unnumbered_class_listand passes it to tocObj.unnumbered_class_listwill be parsed as usual.unnumbered_class_listwill be parsed withunnumbered: true.As is provided in
test/toc_obj.spec.js, I have made minimized modifications as much as possible.P.S. Maybe
unnumbered_class_listis too long?