-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(toc_obj): Support unnumbered headings #269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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_list
and passes it to tocObj.unnumbered_class_list
will be parsed as usual.unnumbered_class_list
will 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_list
is too long?