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
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
Alex Kocharin
80a3adc094
Fix crash in linkify inline rule on malformed input
1 year 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
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
eed156e9cd
Fix emphasis algorithm as per 0.30 spec
https://github.com/commonmark/cmark/issues/383
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
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
2290e109c5
Disallow escaped spaces inside link destination
4 years ago
Alex Kocharin
fece91e265
Fix backtick algorithm
now it more closely matches one in `cmark`
4 years ago
Alex Kocharin
b1651b1363
Stop link title parsing when second `(` is found
`[](url (xxx())` is no longer a valid link
4 years ago
Alex Kocharin
f688abccaf
Stop link parsing when second `<` is found
`[](<foo<bar>)` is no longer a valid link
4 years ago
Alex Kocharin
b56eeb01d9
Table with no columns is no longer a table
this is now just raw text:
```md
|
|
|
```
close https://github.com/markdown-it/markdown-it/issues/724
4 years ago
Alex Kocharin
75fe6e0c76
Fix tables inside lists indented with tabs
close https://github.com/markdown-it/markdown-it/issues/721
4 years ago
Alex Kocharin
f156ed1bff
Don't decode %25 in beautified urls
fix https://github.com/markdown-it/markdown-it/issues/720
4 years ago
Alex Kocharin
3021a5207b
Bring pipe escape algorithm in tables closer to gfm
- table now doesn't deal with backticks at all
- `|` is considered escaped if and only if there is a `\` character immediately before it
- number of elements in the first row (thead) now must match second row (aligns) exactly
- no tbody if it would be empty
close https://github.com/markdown-it/markdown-it/issues/689
close https://github.com/markdown-it/markdown-it/pull/697
4 years ago
Alex Kocharin
805c69528d
Fix smartquotes adjacent to code block
close https://github.com/markdown-it/markdown-it/issues/677
4 years ago
Alex Kocharin
b3531c876e
Fix blockquotes
```
>>> foo
> bar
>>> baz
```
this is now a single blockquote as per spec
close https://github.com/markdown-it/markdown-it/issues/696
4 years ago
Alex Kocharin
f798bea962
Allow opening quote after another punctuation char in typographer
close https://github.com/markdown-it/markdown-it/issues/643
5 years ago
Alex Kocharin
3c427f921e
Fix em- and en-dashes not being typographed when separated by 1 char
close https://github.com/markdown-it/markdown-it/issues/624
5 years ago
Alex Kocharin
07a62c6c75
Move nested delimiter info to opening token instead of inline state
5 years ago
Alex Kocharin
7421ecce67
Improve normalization for reference label matching
Simple toUpperCase() does not work for various ligatures and legacy
characters that are already in a different upper case form.
See also:
278ea515fe
5 years ago
Alex Kocharin
02a2605e84
Reduce maximum length for numeric html entities
This is no longer recognized as an entity, according to commonmark 0.29 tests:
�
See also:
026ca8234b
5 years ago
Alex Kocharin
7997fdadcd
Apply special rules for collapsing whitespace inside code blocks
Change as per commonmark 0.29 spec
See also:
e121b4e301
5 years ago
Alex Kocharin
254b776beb
Allow tildes in info string of a fence block with tilde marker
This is now allowed as per commonmark 0.29 spec:
~~~ js ~~~
console.log('hello, world!');
~~~
See also:
b7651e4f8b
5 years ago
Alex Kocharin
04d36a3f1a
Fix smartquotes around softbreaks
close https://github.com/markdown-it/markdown-it/issues/430
7 years ago
Alex Kocharin
a733ffa8b6
Fix blockquote termination inside lists
close https://github.com/markdown-it/markdown-it/issues/386
7 years ago
Alex Kocharin
c57f593b23
Fix blockquote termination by list item
close https://github.com/markdown-it/markdown-it/issues/338
8 years ago
Alex Kocharin
f0e7e562ea
Fix blockquote termination inside indented lists
close https://github.com/markdown-it/markdown-it/issues/329
8 years ago
Alex Kocharin
dc1c392a4d
Remove tabs at the beginning of the line in paragraphs
8 years ago
Alex Kocharin
d29f421927
Fix table indentation issues
close https://github.com/markdown-it/markdown-it/issues/325
reverts https://github.com/markdown-it/markdown-it/pull/224
8 years ago
Alex Kocharin
9eb2a26005
Fix backtick handling inside tables
Fix https://github.com/markdown-it/markdown-it/issues/303
8 years ago
Alex Kocharin
93544ee4bf
Fenced code block info string should not contain fence marker
Fix https://github.com/markdown-it/markdown-it/issues/301
8 years ago
Alex Kocharin
1bb254b879
Allow tabs inside GFM tables
8 years ago
Alex Kocharin
7a053ef4c5
Fix tab behavior inside blockquotes
8 years ago
Alex Kocharin
9335394a99
Disable replacements inside autolinks
close https://github.com/markdown-it/markdown-it/issues/272
8 years ago
Christopher Breeden
a2b7b8e156
Fixes #246 , HTML Escaping alt-tag twice.
9 years ago
Sean Lang
10d6448b22
support tables with missing values
(and add supporting test case)
9 years ago
Alex Kocharin
637c776ec5
Allow multiline setext headers
9 years ago
Alex Kocharin
a18ddc0223
Loosen table rules
1. allow one-column tables
2. allow mismatched column count
close https://github.com/markdown-it/markdown-it/issues/171
9 years ago
Alex Kocharin
946b1a1961
Take into account adjacent tokens in smartquotes
close https://github.com/markdown-it/markdown-it/issues/181
9 years ago
Alex Kocharin
0318337a3d
Bump table priority before code blocks
ref https://github.com/markdown-it/markdown-it/issues/120
9 years ago