Skip to content

shytikov/markdown-it-hierarchy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-it-hierarchy

Adds numbering hierarchy to markdown-it headers.

const md = require('markdown-it')()
  .use(require('markdown-it-hierarchy'));

Following markdown code:

#  First header of top level
## First subheader of first header
## Second subheader of first header
## Third subheader of first header
#  Second header of top level
#  Third header of top level
## First subheader of third header
### First subheader of first subheader of third header
### Second subheader of first subheader of third header
### Third subheader of first subheader of third header

Will produce hierarchy of headers:

1. First header of top level

1.1. First subheader of first header

1.2. Second subheader of first header

1.3. Third subheader of first header

2. Second header of top level

3. Third header of top level

3.1. First subheader of third header

3.1.1. First subheader of first subheader of third header

3.1.2. Second subheader of first subheader of third header

3.1.3. Third subheader of first subheader of third header

About

Adds numbering hierarchy to headers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published