Migration to v5
November 4, 2025 ยท View on GitHub
v5 has the same external API as v4, only internals were changed. Some external
plugins may need update (all plugins from markdown-it github organization are
up to date).
For users
External API did not change.
- If you use
markdown-itwith plugins, make sure to update them.
For plugin developers
- added
stateBlock.sCountto calculate indents instead ofstateBlock.tShift, it only differs if tabs are present:stateBlock.tShiftis used to calculate a number of characters (tab is 1 character)stateBlock.sCountis used to calculate the block offset (tab is 1-4 characters depending on position)
- added
stateInline.ruler2andstateInline.delimitersneeded to parse emphasis-like markup better- emphasis-like tags now can't be skipped with
stateInline.skipToken, they treat a sequence of markers (e.g.***) as a token instead stateInline.delimitersis linked withstateInline.tokens, so truncating/splicingstateInline.tokensmay break things
- emphasis-like tags now can't be skipped with