Michael Howell
0bfc57de42
Update spec to 0.31.2
9 months ago
Michael Howell
cd2477863f
Update to comply with spec 0.31.2
The spec update changes these things:
* It simplifies the HTML regex so that `<!-- a -- b -->` is an HTML
comment. HTML5 reports this as an error, but still parses it.
* It changes the set of known HTML block elements to match HTML5, adding
`search` and removing `source`.
* It adds Unicode Symbols to the set of punctuation characters that are
used to evaluate flankingness.
This commit also changes the declaration HTML regex to match lowercase,
even though that change was technically made in spec version 0.30.
9 months ago
Alex Kocharin
de814cae73
fix quadratic complexity in reference parser ( #1004 )
9 months ago
Michael Howell
806beade25
Add new pathological test from cmark upstream ( #1008 )
9 months ago
Vitaly Puzrin
c1f3ff7b54
Drop babelmark responder support
12 months ago
Alex Kocharin
d9885bad6e
Render html tags inside img alt as their original text ( #979 )
Spec is not clear on how to handle this. Three variations exist:
```
$ echo '![text <textarea> text](image.png)' | /home/user/commonmark.js/bin/commonmark
<p><img src="image.png" alt="text <textarea> text" /></p>
$ echo '![text <textarea> text](image.png)' | /home/user/cmark/build/src/cmark
<p><img src="image.png" alt="text <textarea> text" /></p>
$ echo '![text <textarea> text](image.png)' | /home/user/.local/bin/commonmark
<p><img src="image.png" alt="text text" /></p>
```
Prior to this commit:
- when HTML tags are enabled, tags were removed (as in Haskell version)
- when HTML tags are disabled, tags were escaped (as in C version)
After this commit:
- tags will be escaped (as in C version) regardless of HTML flag
+ render hardbreaks as newlines, same as cmark
12 months ago
Vitaly Puzrin
8b815a6072
lint: reduce empty lines
12 months ago
Vitaly Puzrin
3c66f25608
eslint: config cleanup & drop nested configs
12 months ago
Vitaly Puzrin
5578e698af
Cleanup internal exports
12 months ago
Vitaly Puzrin
7f0f211a20
Add CJS build fallback
12 months ago
Vitaly Puzrin
efc714f702
standard: more tweaks & simplify eslint config
12 months ago
Vitaly Puzrin
94177fca70
standard: spaces in comments
12 months ago
Vitaly Puzrin
9e7378775f
standard: init vars in separate declaration
12 months ago
Vitaly Puzrin
7dfcf69b71
standard: no spaces near array brackets
12 months ago
Vitaly Puzrin
0eb4cb96a4
standard: space before function params
12 months ago
Vitaly Puzrin
d0219010ad
standard: remove semi
12 months ago
Vitaly Puzrin
88b8669c46
var => const, let
12 months ago
Vitaly Puzrin
e92e776411
Rewrite core to es6 modules
1 year ago
Vitaly Puzrin
8980511a7a
Rewrite tests to es6 modules
1 year ago
Alex Kocharin
80a3adc094
Fix crash in linkify inline rule on malformed input
1 year ago
Alex Kocharin
49ca65bbef
Sync pathological tests with cmark
1 year ago
Alex Kocharin
2b6cac2582
Sync pathological tests with cmark
this reflects following commit, no changes are necessary:
eb54ef4d68
2 years ago
Alex Kocharin
1529ff4944
Guard against custom rule not incrementing pos
3 years ago
Alex Kocharin
f52351499b
Remove (p) => § replacement in typographer
close https://github.com/markdown-it/markdown-it/issues/763
3 years ago
Alex Kocharin
3fc0deb38b
Put entities to separate token
3 years ago
Alex Kocharin
6b58ec4245
Add linkifier rule to inline chain for full links
prevents emphasis from appearing in `http://example.org/foo._bar_.baz `
3 years ago
Alex Kocharin
75037c6514
Put escape sequences into separate token
3 years ago
Vitaly Puzrin
ffc49ab46b
Fix possible ReDOS in newline rule.
Co-authored-by: MakeNowJust <make.just.on@gmail.com>
3 years ago
Alex Kocharin
1cd8a5143b
Fix tab preventing paragraph continuation in lists
close https://github.com/markdown-it/markdown-it/issues/830
3 years ago
Alex Kocharin
24abaa51a6
Improve emphasis algorithm
This fixes quadratic complexity in `**<...>**a**<...>**`
pathological case.
3 years ago
Eddie Kohler
8bcc82aa74
Parser: Set ordered list_item_open token info to input marker.
For instance, in a list
1. Item 1
20. Item 2
the first list_item_open token will have token.info === '1', and the
second will have token.info === '20'.
This is useful for later rendering plugins that might want to
use the actual markers.
3 years ago
Alex Kocharin
77fb93739d
Add pathological test from cmark
3 years ago
Taneli Hukkinen
e5986bb7cc
Always suffix indented code block with a newline
3 years ago
Alex Kocharin
eed156e9cd
Fix emphasis algorithm as per 0.30 spec
https://github.com/commonmark/cmark/issues/383
3 years ago
Alex Kocharin
0b14fa069f
Update CommonMark spec to 0.30
3 years ago
Taneli Hukkinen
272a470ed2
Fix newline not rendered in image alt attribute
4 years ago
Alex Kocharin
309c03a9e8
Lower priority for ATX headers to resolve conflict with HTML blocks
fix https://github.com/markdown-it/markdown-it/issues/772
4 years ago
Taneli Hukkinen
cd5296f1e7
Fix table/list parsing ambiguity ( #767 )
4 years ago
Alex Kocharin
c9dd942246
Fix crash when processing strikethrough
close https://github.com/markdown-it/markdown-it/issues/742
4 years ago
Vitaly Puzrin
fc3dc00e2b
Update pathological tests crc
4 years ago
Alex Kocharin
ddbb195546
Remove meta from list of block html tags
ref https://github.com/commonmark/commonmark-spec/issues/527
4 years ago
Alex Kocharin
8ad16ac4d9
Allow EOL in processing instructions
same fix as in https://github.com/commonmark/commonmark.js/issues/196
4 years ago
Alex Kocharin
e729b90a1d
Fix quadratic complexity in autolinks
close https://github.com/markdown-it/markdown-it/issues/737
4 years ago
Alex Kocharin
8cd6fc34c4
Fix quadratic compexity on backticks
close https://github.com/markdown-it/markdown-it/issues/736
4 years ago
Alex Kocharin
2290e109c5
Disallow escaped spaces inside link destination
4 years ago
Alex Kocharin
83b05755db
Fix quadratic time on emphasis
close https://github.com/markdown-it/markdown-it/issues/735
4 years ago
Vitaly Puzrin
77cccb83a5
Restrict pathological tests execution time
4 years ago
Vitaly Puzrin
1db3f95e71
Track cmark pathological tests updates
4 years ago
Alex Kocharin
73281d8b42
Port pathological tests from cmark
4 years ago
Alex Kocharin
fece91e265
Fix backtick algorithm
now it more closely matches one in `cmark`
4 years ago