Comments (6)
Hi,
thank you for reporting this.
Try putting the list marker explicitly:
print(md_toc.build_toc('test.md', ordered=True, list_marker=')'))
or
print(md_toc.build_toc('test.md', ordered=True, list_marker='.'))
I think that some API changes are needed.
from md-toc.
Thank you for your quick reply, it works! The result is not exactly what I expected, though. Is there any option/plan for generating chained numbering, like 2.1.4?
from md-toc.
No, unfortunately there is no such option but it might not be too hard to implement.
from md-toc.
May be it's a little harder if you renumber back the actual sections. I think this is how the numbering works usually. However, when the Markdown file is versioned, it results in some more noise. So I think I will stick with ordered=False
for the moment. Thanks! 😸
from md-toc.
Ah ok. No problem.
But if you mean like:
1.
2.
2.1.
2.1.1.
2.2.
2.2.1.
I'm not even sure it is possible (i.e. interpreted as an ordered list) according to the markdown specifications (see for example https://github.github.com/gfm/#ordered-list).
from md-toc.
ef555d0 fixes this issue.
from md-toc.
Related Issues (20)
- CommonMark Spec 0.29 is out HOT 1
- 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
- Irregular jumps in heading size not being recognized HOT 4
- There are no diff unless we specify `-p` HOT 9
- IndexError: list index out of range HOT 5
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.