Vitaly Puzrin
8b815a6072
lint: reduce empty lines
12 months ago
Vitaly Puzrin
94177fca70
standard: spaces in comments
12 months ago
Vitaly Puzrin
9e7378775f
standard: init vars in separate declaration
12 months ago
Vitaly Puzrin
7dfcf69b71
standard: no spaces near array brackets
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
Vitaly Puzrin
8980511a7a
Rewrite tests to es6 modules
1 year ago
Alex Kocharin
1529ff4944
Guard against custom rule not incrementing pos
3 years ago
Alex Kocharin
75037c6514
Put escape sequences into separate token
3 years ago
Eddie Kohler
8bcc82aa74
Parser: Set ordered list_item_open token info to input marker.
For instance, in a list
1. Item 1
20. Item 2
the first list_item_open token will have token.info === '1', and the
second will have token.info === '20'.
This is useful for later rendering plugins that might want to
use the actual markers.
3 years ago
Taneli Hukkinen
e5986bb7cc
Always suffix indented code block with a newline
3 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
Vitaly Puzrin
c36309ef1c
Bump eslint & update CS
5 years ago
Alex Kocharin
2959f8c27c
Update CommonMark spec to 0.28
7 years ago
Vitaly Puzrin
c9199b582d
Better error message for bad input type, close #324
8 years ago
Alex Kocharin
6dbe532460
Replace standalone CR with LF when normalizing newlines
fix #252
9 years ago
Marijn Haverbeke
5837f6bc5b
Add an attrGet method to Token
To make it easier to write code that consumes tokens for
tasks other than generating HTML.
9 years ago
Alex Kocharin
53aec24168
Improve performance in `skipToken` when maxNesting is exceeded
9 years ago
Alex Kocharin
de4abb573c
Fix "too much recursion" error in links
9 years ago
Vitaly Puzrin
87ece24ff9
Allow full content override from highlighter
9 years ago
Vitaly Puzrin
18f1531024
New .attrJoin() & .attrSet() methods in Token
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
Vitaly Puzrin
bf424c8a49
deps update, configs & code cleanup
9 years ago
Alex Kocharin
a7b2b3b4e8
Add multichar replacements in smartquotes
fix #115
10 years ago
Alex Kocharin
7037ee34ad
Add tests for normalization functions
10 years ago
Vitaly Puzrin
18d80c6f0b
Moved validateLink() to root class
10 years ago
Alex Kocharin
4aabd5592e
Use a common class for tokens
10 years ago
Vitaly Puzrin
0053036571
Improved tests coverage
10 years ago
Alex Kocharin
096f0fbb89
Fix maxNesting + tests
10 years ago
Vitaly Puzrin
e8994dbbd7
Show text diffs for failed tests
10 years ago
Vitaly Puzrin
9656072b27
Coverage: added top api tests
10 years ago
Vitaly Puzrin
cac27bb022
Moved utilities tests to separate file & added missed ones
10 years ago
Vitaly Puzrin
47b71bae94
Fixed broken surrogates replacer
10 years ago
Vitaly Puzrin
9783b530db
Added to top enable/disable methods & errors throw
10 years ago
Vitaly Puzrin
90e5a9c9cc
Bulk rules rename (unify)
10 years ago
Vitaly Puzrin
79b11bc564
Removed 'full' preset - not needed anymore
10 years ago
Vitaly Puzrin
b2a212ffc3
Replace null characters with 0xFFFD instead of strip
10 years ago
Vitaly Puzrin
d5f43dd9b6
Dropped custom fences support - overcomplication
10 years ago
Vitaly Puzrin
8b3f29df82
Fixed termination rules check when rules disabled, closes #13
10 years ago
Vitaly Puzrin
958308a3b0
Added `zero` preset. Related to #12
10 years ago
Vitaly Puzrin
d8c1b1f7d6
Strip NULL characters, according to new spec
10 years ago
Vitaly Puzrin
2a9218cf60
Updated line breaks rendering logic
10 years ago
Vitaly Puzrin
a5a04532df
Both helpers & utils are not in each instance of main parser
10 years ago
Vitaly Puzrin
abaf1e3553
Added bulk enable/disable sugar
10 years ago
Vitaly Puzrin
c3bd40ab04
Configs & code cleanup
10 years ago
Vitaly Puzrin
9afffbaefd
Changed project name, links, attribution & updated constructor call
10 years ago
Vitaly Puzrin
dc960ed60a
Added extension to renderer
10 years ago
Vitaly Puzrin
f8e270f6e0
Added renderer rules rewrite test
10 years ago