Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed https://markdown-it.github.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

10 years ago
Migration to v4
===============
v4 has the same external API as v3, but significantly changed internals. Plugin
authors should update their packages.
10 years ago
## For users
External API did not changed.
- If you used `markdown-it` with plugins - make shure to update those.
- If you modified renderer - see dev info below.
- If you did not used plugins and renderer modification - no chanches needed.
## For Developpers
### Tokens and renderer
10 years ago
- [Tokens](https://github.com/markdown-it/markdown-it/blob/master/lib/token.js)
are now classes, and allow arbitrary attributes.
- new tokens are created with `token = state.push(type, tag, nesting)`.
See [this commit](https://github.com/markdown-it/markdown-it/commit/4aabd5592ea55fb43d6a215b316c89c6f6f1f7db) to understand
10 years ago
how to create tokens in new way. Also see changes in plugins from other
repos in this org.
10 years ago
- [Renderer](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
methods were unified. Number of custom renderer rules were significantly reduced.
10 years ago
Custom renderer functions need update due tokens format change.
10 years ago
10 years ago
### Other changes
10 years ago
10 years ago
- `.validateUrl()` -> moved to root class `.validateLink()`
10 years ago
- added `.normalizeLink()` & `.normalizeLinkText()` to root class, and removed
`normalizeUrl()` from utils.
10 years ago
- removed `replaceEntities()` in `utils`.