Alex Kocharin
25fea504f6
Update emphasis to match CommonMark 0.19
10 years ago
Vitaly Puzrin
73599e022b
Fixed emphasis closing token marker, closes #69
10 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
Vitaly Puzrin
d76475721c
typo fix
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
Alex Kocharin
ecd010c020
Bring emphasis up to spec
10 years ago
Vitaly Puzrin
e1f6e3b6f8
Use new emphasis logic in strikethrough
10 years ago
Vitaly Puzrin
c2312d971f
Fixed punctuation check in emphasis
10 years ago
Alex Kocharin
b7914cb08a
Update CommonMark spec to 0.15 + emphasis changes
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
e12d5cbdad
Allow sequence of 4+ markers in emphases
In old CommonMark spec they were always parsed literally.
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
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
Alex Kocharin
7abfb2718c
Treat newline as a whitespace in em and del
10 years ago
Alex Kocharin
5a73b286b6
Update emphasis rule to the latest CommonMark spec
10 years ago
Vitaly Puzrin
b27c630815
Code structure and options refactoring
10 years ago
Alex Kocharin
9942fd5b4b
Add strikeout (del) tag
+ trivial emphasis bugfix
10 years ago
Vitaly Puzrin
892460ed0b
Options rename
10 years ago
Alex Kocharin
9aea37acc1
Limit element depth
10 years ago
Alex Kocharin
0453b72bf1
Rename "lexer" to "parser"
and move rules from lexer_* to rules_*
10 years ago
Alex Kocharin
46dc1f93ac
Add state.level everywhere
10 years ago
Alex Kocharin
b492fa2cc2
Add tokenizeSingle method
10 years ago
Alex Kocharin
3afaf55344
Fix: "\*" isn't a part of a emphasis marker sequence
10 years ago
Alex Kocharin
74a84f8ecd
Implement emphasis parsing
10 years ago