Alex Kocharin
e729b90a1d
Fix quadratic complexity in autolinks
close https://github.com/markdown-it/markdown-it/issues/737
4 years ago
Alex Kocharin
8cd6fc34c4
Fix quadratic compexity on backticks
close https://github.com/markdown-it/markdown-it/issues/736
4 years ago
Alex Kocharin
83b05755db
Fix quadratic time on emphasis
close https://github.com/markdown-it/markdown-it/issues/735
4 years ago
Alex Kocharin
537ab89d7c
Don't try to parse link title if link wasn't found
4 years ago
Alex Kocharin
fece91e265
Fix backtick algorithm
now it more closely matches one in `cmark`
4 years ago
Alex Kocharin
1e8aff0084
Fix quadratic time on backticks
This commit adds a cache `StateInline->backticks` which remembers
positions for every possible backtick closer (`, ``, ```, etc.).
Algorithm is similar to one described here:
685b714453
close https://github.com/markdown-it/markdown-it/issues/733
4 years ago
ocavue
b979ca01d5
fix: remove unused comparison code
4 years ago
Alex Kocharin
07a62c6c75
Move nested delimiter info to opening token instead of inline state
5 years ago
Alex Kocharin
a1c93811f8
Fix incorrect level recalculation in text_collapse
close #466
5 years ago
Vitaly Puzrin
c36309ef1c
Bump eslint & update CS
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
2959f8c27c
Update CommonMark spec to 0.28
7 years ago
Rifat Nabi
696231b28d
Fix a small typo
7 years ago
Alex Kocharin
dc1c392a4d
Remove tabs at the beginning of the line in paragraphs
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
f07d3862ff
Implement odd matching rules for emphasis
8 years ago
Vitaly Puzrin
760050edcb
eslint update & code cleanup
9 years ago
Alex Kocharin
0661eea828
Remove scheme whitelist for autolinks
9 years ago
Alex Kocharin
1482c3e64f
Disallow spaces inside links
1. between link label and reference: `[foo] [bar]`
2. inside angular brackets: `[](<foo bar>)`
9 years ago
Alex Kocharin
f2344b5cbc
Add `content` property to image token
close https://github.com/markdown-it/markdown-it/issues/184
9 years ago
Alex Kocharin
b2883a7fd2
Fix meta information for autolink tokens
9 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
b2aee1a978
Expand tabs only when it's needed, as per CommonMark 0.21
9 years ago
Alex Kocharin
25fea504f6
Update emphasis to match CommonMark 0.19
9 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
Alex Kocharin
b8f7b5b64e
Add markup info for autolink and linkifier tokens
10 years ago
Alex Kocharin
77e8b6cad0
Add configurable url normalizers
- md.normalizeLink
- md.normalizeLinkText
10 years ago
Alex Kocharin
7f8d3ebe82
Update strikethrough scanDelims to match emphasis
10 years ago
Alex Kocharin
f1aff8a5b9
Add StateCore.Token and StateCore.push()
so all state objects would have roughly the same interface
10 years ago
Alex Kocharin
5a390adbbc
Make Token class accessible from a State
10 years ago
Vitaly Puzrin
d76475721c
typo fix
10 years ago
Vitaly Puzrin
00117cb2e7
Changes to improve speed on node 0.12 & iojs
10 years ago
Vitaly Puzrin
e6e573efa6
Added example of tuneable text rule, for memory
10 years ago
Vitaly Puzrin
18d80c6f0b
Moved validateLink() to root class
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
e77666c4a0
moved normalizeReference to utils, closes #42
10 years ago
Alex Kocharin
4ce003cb82
Remove stateInline.labelUnmatchedScopes
looks like a dead code
10 years ago
Vitaly Puzrin
e1f6e3b6f8
Use new emphasis logic in strikethrough
10 years ago
Vitaly Puzrin
6ab7cc30a4
Use the same regexp for comments as reference parser
10 years ago
Vitaly Puzrin
c2312d971f
Fixed punctuation check in emphasis
10 years ago
Vitaly Puzrin
8267f509b0
Added # to terminator chars, closes #31
10 years ago
Vitaly Puzrin
cda6c513b6
backtick -> backticks (revert)
10 years ago
Vitaly Puzrin
2090fd4998
del -> strikethrough
10 years ago
Vitaly Puzrin
90e5a9c9cc
Bulk rules rename (unify)
10 years ago