Alex Kocharin
24abaa51a6
Improve emphasis algorithm
This fixes quadratic complexity in `**<...>**a**<...>**`
pathological case.
3 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
07a62c6c75
Move nested delimiter info to opening token instead of inline state
5 years ago
Alex Kocharin
378ac9074e
Change emphasis parsing algorithm
Tokenize first, and replace tokens with emphasis tags on
a second pass using an algorithm close to one used in CM.
9 years ago
Alex Kocharin
3ba6f8b6d2
Tweak scanDelims algorithm
- explicitly set nextChar and lastChar to 0x20 at the begin/end of line
- `_` between punctuation characters can now close an emphasis, see:
https://github.com/jgm/commonmark.js/issues/12#issuecomment-77421682
- `"` between punctuation characters can now be a closed quote
in smartquotes rule.
10 years ago
Alex Kocharin
7f8d3ebe82
Update strikethrough scanDelims to match emphasis
10 years ago
Alex Kocharin
bb4dcf48f4
Set token.markup whereever appropriate
10 years ago
Alex Kocharin
4aabd5592e
Use a common class for tokens
10 years ago
Vitaly Puzrin
e1f6e3b6f8
Use new emphasis logic in strikethrough
10 years ago
Vitaly Puzrin
2090fd4998
del -> strikethrough
10 years ago
Vitaly Puzrin
04ee60d3c4
Removed unused code & improved tests coverage for some rules.
10 years ago
Vitaly Puzrin
e72603af70
Moved nesting check from rules to upper level
10 years ago
Vitaly Puzrin
a66e29f8d0
Place md link to states and remove other aliases
10 years ago
Alex Kocharin
0c0917048c
Allow sequence of 4+ markers in pairs
10 years ago
Vitaly Puzrin
671fd4f3ed
eslint rules & coding style update
10 years ago
Alex Kocharin
74602dba90
Fix spaces in subscript and superscript
10 years ago
Alex Kocharin
d5e8e61b6b
Check validation flag instead of hardcoding rules
10 years ago
Alex Kocharin
666e94a47a
Change priority for all pairs
`**foo __bar** baz__` is now parsed as `<strong>foo __bar</strong> baz__`
10 years ago
Vitaly Puzrin
710a62f1d5
Added <ins> support
10 years ago
Vitaly Puzrin
f15fa5ed23
Renamed back `strikethrough` to `del`
10 years ago
Alex Kocharin
1676e10ee8
Fix performance when nested token doesn't match
close #53
10 years ago
Vitaly Puzrin
2040c4f02e
StateInline props rename
10 years ago
Alex Kocharin
ba2463f2f5
Remove dead code in em/del
10 years ago
Alex Kocharin
f74bbf2515
Tweak emphasis parsing algorithm
In the case of intersecting tags (e. g. "*foo _bar* baz_") last
complete tag should have a priority.
10 years ago
Alex Kocharin
5d772b9bb6
Add validation mode to all inline rules
10 years ago
Vitaly Puzrin
bf1016510b
typo fix
10 years ago
Alex Kocharin
7abfb2718c
Treat newline as a whitespace in em and del
10 years ago
Vitaly Puzrin
92d9fde585
del -> strikethrough
10 years ago
Alex Kocharin
9942fd5b4b
Add strikeout (del) tag
+ trivial emphasis bugfix
10 years ago