marked
18.2.1 · 16 Nov 2026MIT138.2M / weekRepositoryHomepagenpmAtom feed
3.0.8 is the newest release of 3.x.
In short
9 breaking1 removed3 fixed
- Breaking
Add module field to package.json
- Breaking
Drop support for node 10.
- Breaking
Tokenizers will create their own tokens with
this.lexer.inline(text, tokens). Theinlinefunction will queue the token creation until after all block tokens are created. - Breaking
Extensions tokenizer
thisobject will include thelexeras a property.this.inlineTokensbecomesthis.lexer.inline. - Breaking
Extensions renderer
thisobject will include theparseras a property.this.parseInlinebecomesthis.parser.parseInline. - Breaking
tagandinlineTexttokenizer function signatures have changed. - Breaking
nptabletokenizer is removed and merged withtabletokenizer. - Breaking
tabletokensheaderproperty changed to contain an array of objects for each header cell withtextandtokensproperties.
Security
2 advisories affect 3.0.0; 4.0.10 fixes them
- HighInefficient Regular Expression Complexity in markedGHSA-5v2h-r2cx-5xgj · 14 Jan 2022Fixed in 4.0.10
- HighInefficient Regular Expression Complexity in markedGHSA-rrrm-qjm4-v8hf · 14 Jan 2022Fixed in 4.0.10
Release note
Bug Fixes
Tokenizers lex their own child tokens
Add module field to package.json
- Removed
Drop node 10 support
Full Commonmark compliance for Lists
Refactor table tokens
Breaking changes
- Breaking
Drop support for node 10.
- Breaking
Add module field to package.json
- Breaking
Tokenizers will create their own tokens with
this.lexer.inline(text, tokens). Theinlinefunction will queue the token creation until after all block tokens are created. - Breaking
Extensions tokenizer
thisobject will include thelexeras a property.this.inlineTokensbecomesthis.lexer.inline. - Breaking
Extensions renderer
thisobject will include theparseras a property.this.parseInlinebecomesthis.parser.parseInline. - Breaking
tagandinlineTexttokenizer function signatures have changed.
- Breaking
nptabletokenizer is removed and merged withtabletokenizer. - Breaking
tabletokensheaderproperty changed to contain an array of objects for each header cell withtextandtokensproperties. - Breaking
tabletokenscellsproperty changed torowsand is an array of rows where each row contains an array of objects for each cell withtextandtokensproperties.
v2 table token:
{
"type": "table",
"align": [null, null],
"raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
"header": ["a", "b"],
"cells": [["1", "2"]],
"tokens": {
"header": [
[{ "type": "text", "raw": "a", "text": "a" }],
[{ "type": "text", "raw": "b", "text": "b" }]
],
"cells": [[
[{ "type": "text", "raw": "1", "text": "1" }],
[{ "type": "text", "raw": "2", "text": "2" }]
]]
}
}v3 table token:
{
"type": "table",
"align": [null, null],
"raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
"header": [
{
"text": "a",
"tokens": [{ "type": "text", "raw": "a", "text": "a" }]
},
{
"text": "b",
"tokens": [{ "type": "text", "raw": "b", "text": "b" }]
}
],
"rows": [
{
"text": "1",
"tokens": [{ "type": "text", "raw": "1", "text": "1" }]
},
{
"text": "2",
"tokens": [{ "type": "text", "raw": "2", "text": "2" }]
}
]
}A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.