Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages