Comments (4)
Did you try running it like this?
md_toc github -l6 file.md
If you did you should have seen this exception raised: md_toc.exceptions.TocDoesNotRenderAsCoherentList
If you run md-toc like this however
md_toc github file.md
it uses the default maximum header level of 3 (-l3
) and the second line is not even parsed fully.
Like this it works as you expect it to:
md_toc --no-list-coherence github -l6 file.md
- [Known Issues](#known-issues)
- [Compatibility](#compatibility)
from md-toc.
I'm using the Python API. I'm trying out the keep_header_level argument. It works as expected when I pass in 1, 2, or 3, but as soon as I pass in 4, 5, or 6, it fails with no error. I get no TOC generated at all.
toc = md_toc.build_toc(filename='build-toc.md', parser='gitlab', keep_header_levels=4)
from md-toc.
ok, we get what we expect when we use this:
toc = md_toc.build_toc(filename='build-toc.md', parser='gitlab', no_list_coherence=True, keep_header_levels=4)
Just FYI, the documentation page shows the no_list_coherence argument in the function signature but the description for this argument is missing.
from md-toc.
Thanks. Haven't notice that. It's fixed now.
from md-toc.
Related Issues (20)
- Ordered TOC doesn't work HOT 6
- Title with trailing spaces HOT 1
- I get thi serror after `pip install md-toc` HOT 4
- Allow "1." only ordered TOC lists output HOT 10
- Feature Request: Automatically skip lines to first or (N) TOC HOT 1
- Links not working when some styling is used in the header on GitHub HOT 5
- multiple hyphens in anchor links for GitLab Flavored Markdown
- Probably wrong license declaration HOT 3
- Redcarpet v3.5.1 is out
- Feature request: Support MD in argument instead of file HOT 4
- Commonmark 0.30 is out HOT 1
- Incorrect Type Annotation for `build_anchor_link` Function
- Line Endings Are Always CRLF on Windows HOT 4
- Consider Mentioning Existence of GitHub's Built-In Markdown Table of Contents HOT 4
- Is it possible to ignore certain headers? HOT 2
- Invalid Cross-device Link HOT 8
- There are no diff unless we specify `-p` HOT 9
- IndexError: list index out of range HOT 5
- API change for versions 9.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md-toc.