mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
fix: prevent GFM table tokens from greedily capturing trailing newlines (#3926)
Co-authored-by: Pushkar Gupta <your_email@example.com>
This commit is contained in:
co-authored by
Pushkar Gupta
parent
b379e3e571
commit
40f266560a
+1
-1
@@ -525,7 +525,7 @@ export class _Tokenizer<ParserOutput = string, RendererOutput = string> {
|
||||
|
||||
const item: Tokens.Table = {
|
||||
type: 'table',
|
||||
raw: cap[0],
|
||||
raw: rtrim(cap[0], '\n'),
|
||||
header: [],
|
||||
align: [],
|
||||
rows: [],
|
||||
|
||||
@@ -1016,6 +1016,7 @@ br
|
||||
['text', '2'],
|
||||
['text', '3'],
|
||||
['text', '4'],
|
||||
['space', ''],
|
||||
['blockquote', '> blockquote'],
|
||||
['paragraph', 'blockquote'],
|
||||
['text', 'blockquote'],
|
||||
|
||||
Reference in New Issue
Block a user