Vitaly Puzrin
9f5e9c6069
lint: remove key spacing
12 months ago
Vitaly Puzrin
8b815a6072
lint: reduce empty lines
12 months ago
Vitaly Puzrin
efc714f702
standard: more tweaks & simplify eslint config
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
Alex Kocharin
24abaa51a6
Improve emphasis algorithm
This fixes quadratic complexity in `**<...>**a**<...>**`
pathological case.
3 years ago
Alex Kocharin
07a62c6c75
Move nested delimiter info to opening token instead of inline state
5 years ago
Alex Kocharin
2959f8c27c
Update CommonMark spec to 0.28
7 years ago
Alex Kocharin
f07d3862ff
Implement odd matching rules for emphasis
8 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
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