v3.0.0
·
1174 commits
to master
since this release
3.0.0 (2021-08-16)
Bug Fixes
- Tokenizers lex their own child tokens (#2124) (288f1cb)
- Add module field to package.json (#2143) (edc2e6d)
- Drop node 10 support (#2157) (433b16f)
- Full Commonmark compliance for Lists (#2112) (eb33d3b)
- Refactor table tokens (#2166) (bc400ac)
BREAKING CHANGES
- Drop support for node 10.
- Add module field to package.json
- 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. - Extensions tokenizer
thisobject will include thelexeras a property.this.inlineTokensbecomesthis.lexer.inline. - Extensions renderer
thisobject will include theparseras a property.this.parseInlinebecomesthis.parser.parseInline. tagandinlineTexttokenizer function signatures have changed.
nptabletokenizer is removed and merged withtabletokenizer.tabletokensheaderproperty changed to contain an array of objects for each header cell withtextandtokensproperties.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" }]
}
]
}