Comments (5)
Hi, thanks. I appreciate all contributions! However, I'm not sure if it makes sense to support this. What kind of document starts with a h2?
from markdown-it-table-of-contents.
@martinlissmyr , It is not a common case. We are just trying to cover all the cases possible. In wikis like in Git hub wiki, there is a separate title field which solves the purpose of the h1. So people start with h2 post that. We have seen similar cases in our wiki too. Folks start with h2 if there is a title field for the wiki page. I agree that this is not 80% scenario, but we would wish to not exclude this scenario. It is totally fine if we can get this as an optional behavior.
from markdown-it-table-of-contents.
Ok, I'll buy that... If you do a PR I'll accept it! 😄
from markdown-it-table-of-contents.
@martinlissmyr , I have created a PR : #27
from markdown-it-table-of-contents.
Fixed by #27
from markdown-it-table-of-contents.
Related Issues (20)
- Library doesn't support AMD HOT 1
- Remove dependency on [email protected] which has a security vulnerability (ReDos) HOT 2
- Have a heading for the table of contents HOT 4
- Table of contents rendered incorrectly if no empty line is given before and after the [[toc]] HOT 1
- TOC regex pattern should be matched on the state.src only from the current position parsed HOT 2
- If the header is also a link, the href attribute in <a> will be wrong. HOT 2
- Recognize IDs added by markdown-it-attrs HOT 2
- Unable to pass options object into plugin. HOT 1
- TOC with diacritics not working in IE HOT 1
- Rule link_open HOT 2
- Conflicting with emojis HOT 2
- Support {{TOC}} pattern additionally to [[TOC]] HOT 4
- It would be nice to have a more flexible content generation for links in toc HOT 2
- Mistake in readme with anchor plugin
- Interested in maintaining package HOT 12
- Doesn't respect custom heading ids from markdown-it-attrs / no way to define custom ids
- Incomplete TOC when nesting order is unexpected
- support typora style toc HOT 2
- Add attributes to the TOC list HOT 6
- KaTeX Expressions aren't Included in Anchor Links
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 markdown-it-table-of-contents.