You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interesting idea, but should be --minHeaders 3 to omit the first case right .. since it does have 2 headers?
No bandwidth ATM, I put a help-wanted label.
You are very welcome to add this feature, I like the idea :)
@thlorenz I have opened a PR that I believe is feature complete, but with no test for the new functionality: #142
I am a bit unfamiliar with the current testing setup so would very much appreciate any direction on how to test this as I'm sure you want test coverage prior to merging.
Specific testing issues are:
a) a test seems to be failing prior to my changes
# Subtest: transforming not ok 1 - anchors.split is not a function
b) I am unsure how to test that the TOC wasn't generated
Use case
I want to update many README files throughout my project but I don't want to add a ToC to files with only a single section or heading.
# example flag $ doctoc --minheaders 3
With the above command, this file would not get a ToC:
While this file would get a ToC:
The text was updated successfully, but these errors were encountered: