Vitaly Puzrin
564de6b249
Deps bump & related updates
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
9fe835bc12
Fix mappings for table rows
- `table`, `tbody`, `tr` now have mapping
- `th`, `td`, `inline` in tables do not have it
close https://github.com/markdown-it/markdown-it/issues/705
4 years ago
Alex Kocharin
866fba34a2
Add lang str remainder to highlight callback
``` javascript {line-numbers=5 highlight=14-17}
test
```
This markup now calls `highlight` like this:
require('markdown-it')({
highlight(code, lang, attrs) {
assert(code === 'test')
assert(lang === 'javascript')
assert(attrs === '{line-numbers=5 highlight=14-17}')
}
})
close https://github.com/markdown-it/markdown-it/issues/626
close https://github.com/markdown-it/markdown-it/pull/706
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
Vas Sudanagunta
6629917dec
Remove unnecessary calculation
4 years ago
ocavue
b979ca01d5
fix: remove unused comparison code
4 years ago
Alex Kocharin
0b1699b034
Add missing line mapping for table rows
fix https://github.com/markdown-it/markdown-it/issues/705
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
Philipp_Lypniakov
5c1e80aa26
Fix typos
5 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
Vitaly Puzrin
3d24bda404
Deps bump
5 years ago
Alex Kocharin
07a62c6c75
Move nested delimiter info to opening token instead of inline state
5 years ago
Mathias Bynens
faecae0ba7
Match CommonMark spec exactly
5 years ago
Mathias Bynens
d9cb3ccb67
Don’t recognize U+2028 as a newline character
As of https://github.com/tc39/proposal-json-superset (ES2019), U+2028 is allowed in ECMAScript string literals, just like it already was in JSON strings. Splitting on U+2028 breaks the layout of a Markdown file containing a code example:
https://markdown-it.github.io/#md3=%7B%22source%22%3A%22a%5Cn%5Cn%5Cn%60%60%60js%5Cn%2F%2F%20A%20JavaScript%20object%20%28or%20array%2C%20or%20string%29%20representing%20some%20data.%5Cnconst%20data%20%3D%20%7B%5Cn%20%20LineTerminators%3A%20%27%5C%5Cn%5C%5Cr%E2%80%A8%E2%80%A9%27%2C%20%2F%2F%20%27%5C%5Cn%5C%5Cr%5C%5Cu2028%5C%5Cu2029%27%5Cn%7D%3B%5Cn%60%60%60%5Cn%5Cnb%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D
This patch removes U+2028 as a newline character, to align markdown-it’s behavior more closely with the JavaScript string literal grammar.
5 years ago
Alex Kocharin
a1c93811f8
Fix incorrect level recalculation in text_collapse
close #466
5 years ago
Alex Kocharin
d08c7c3897
Add an example related to case-insensitive comparisons
5 years ago
Vitaly Puzrin
c36309ef1c
Bump eslint & update CS
5 years ago
Alex Kocharin
fa7a419161
Fix edge case for list indents
Now list items cannot be indented more than 4 spaces from the first,
as per commonmark 0.29 spec:
- item 1
- item 2
- item 3
- item 4
- this one is a paragraph continuation
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
e519e6ac19
Fix emphasis matching where delimiters are multiple of 3
This is now allowed as per commonmark 0.29 spec:
ex***amp***le
See also:
83ed53e12a
fix https://github.com/markdown-it/markdown-it/issues/561
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
f872cbc31e
Allow spaces inside brackets in links
This is now allowed as per commonmark 0.29 spec:
[inline link](<./inline link.md>)
fix https://github.com/markdown-it/markdown-it/issues/567
5 years ago
Ted Ge
d533c27017
fix normalize function name ( #538 )
6 years ago
Michal Grňo
6847c9481f
It's "typographic", not "typographyc"
6 years ago
jjyyxx
7f99cfa9b4
fix typo
7 years ago
Alex Kocharin
04d36a3f1a
Fix smartquotes around softbreaks
close https://github.com/markdown-it/markdown-it/issues/430
7 years ago
Cyril Auburtin
3e048188c0
typo
7 years ago
Alex Kocharin
2959f8c27c
Update CommonMark spec to 0.28
7 years ago
Alex Kocharin
a733ffa8b6
Fix blockquote termination inside lists
close https://github.com/markdown-it/markdown-it/issues/386
7 years ago
Rifat Nabi
696231b28d
Fix a small typo
7 years ago
Zanin Andrea
b7dd15fa9c
typo correction
7 years ago
Ullallulloo
bf4ba21254
Fixed typos in comment
8 years ago
Alex Kocharin
c57f593b23
Fix blockquote termination by list item
close https://github.com/markdown-it/markdown-it/issues/338
8 years ago
Vitaly Puzrin
c9199b582d
Better error message for bad input type, close #324
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
Vitaly Puzrin
09e9ad1688
Add missed h2..h6 to whitelisted block tags
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
Igor Bochkariov
ebc9f50759
fallback to reference if a link is not valid
This commit makes martdown-it pass a new example introduced in cfc8416447
```
[foo](not a link)
[foo]: /url1
.
<p><a href="/url1">foo</a>(not a link)</p>
```
Ref: https://github.com/jgm/CommonMark/issues/427
8 years ago
Alex Kocharin
f5a06ec0b6
Make link/image/reference helpers overridable
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
18dd8e3a71
Fix list terminating paragraph shenanigans
8 years ago