Comments (10)
This is not implemented but it should be fairly easy to do
from md-toc.
I have a couple of questions:
- what would you call this option?
- should the user choose the (starting) number?
See https://spec.commonmark.org/0.28/#start-number
from md-toc.
- The user should be able to choose a starting number since it works on Github. 1 is by the far the most common though.
- constant_number_lists? auto_ordered_lists? vc_friendly_ordered_lists? constant_ordered_lists?
I am not sure what the common_mark terminology is for this feature, but it seems like the ordered lists all disregard everything after the first number and renumber themselves anyway when rendered?
from md-toc.
Ok, I'd go with constant_ordered_lists
.
According to https://spec.commonmark.org/0.28/#start-number yes: only the first number is considered.
from md-toc.
There is a problem with nested lists:
1. asd
99. o
10. we
117. abc
1. asd
8309. sd
renders this:
- asd
99. o
10. we
117. abc - asd
- sd
~
while
1. asd
1. o
2. we
3. abc
1. asd
8309. sd
renders:
- asd
- o
- we
- abc
- asd
- sd
I have also tried this in the commonmark interactive page: https://spec.commonmark.org/dingus/ . In that case the start integer number of the nested list must start from 1 to avoid unexpected results.
from md-toc.
from md-toc.
Yes I know. Using 1 without the ability to change it is the only way
from md-toc.
You can test the new feature in the dev branch (commit 31e80c3). The option is called
--constant-ordered-list
or -c
if you run:
md_toc github -h
md_toc redcarpet -h
from md-toc.
Feature now available in version 7.1.0
- https://github.com/frnmst/md-toc/releases/tag/7.1.0
- https://pypi.org/project/md-toc/
- https://frnmst.gitlab.io/software/#md-toc
from md-toc.
Closing. Feel free to reopen.
from md-toc.
Related Issues (20)
- CommonMark Spec 0.29 is out HOT 1
- Ordered TOC doesn't work HOT 6
- Title with trailing spaces HOT 1
- I get thi serror after `pip install md-toc` HOT 4
- 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.