remark-heading-shift
v1.1.2
Published
This plugin increments headings by `shift`. It guards against shifting too far backwards or forwards.
Downloads
118
Readme
remark-heading-shift
This plugin increments headings by shift
. It guards against shifting too far backwards or forwards.
shift
defaults to 1
, it can be a positive or negative value, it will never shift a heading past 6
(because h6
is the smallest HTML heading) in case of a positive shift
, or lower than 1
(h0
is not a valid HTML heading) in case of a negative shift
.
For example, the following markdown:
## foo
#### bar
##### baz
Yields:
(shift=1)
### foo
##### bar
###### baz
(shift=3)
##### foo
###### bar
###### baz
(shift=-2)
# foo
## bar
### baz