Mizux
c7e36eb12d
Fix typo
3 years ago
Alex Kocharin
805c69528d
Fix smartquotes adjacent to code block
close https://github.com/markdown-it/markdown-it/issues/677
4 years ago
Alex Kocharin
f798bea962
Allow opening quote after another punctuation char in typographer
close https://github.com/markdown-it/markdown-it/issues/643
5 years ago
Alex Kocharin
3c427f921e
Fix em- and en-dashes not being typographed when separated by 1 char
close https://github.com/markdown-it/markdown-it/issues/624
5 years ago
Mathias Bynens
faecae0ba7
Match CommonMark spec exactly
5 years ago
Mathias Bynens
d9cb3ccb67
Don’t recognize U+2028 as a newline character
As of https://github.com/tc39/proposal-json-superset (ES2019), U+2028 is allowed in ECMAScript string literals, just like it already was in JSON strings. Splitting on U+2028 breaks the layout of a Markdown file containing a code example:
https://markdown-it.github.io/#md3=%7B%22source%22%3A%22a%5Cn%5Cn%5Cn%60%60%60js%5Cn%2F%2F%20A%20JavaScript%20object%20%28or%20array%2C%20or%20string%29%20representing%20some%20data.%5Cnconst%20data%20%3D%20%7B%5Cn%20%20LineTerminators%3A%20%27%5C%5Cn%5C%5Cr%E2%80%A8%E2%80%A9%27%2C%20%2F%2F%20%27%5C%5Cn%5C%5Cr%5C%5Cu2028%5C%5Cu2029%27%5Cn%7D%3B%5Cn%60%60%60%5Cn%5Cnb%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D
This patch removes U+2028 as a newline character, to align markdown-it’s behavior more closely with the JavaScript string literal grammar.
5 years ago
Vitaly Puzrin
c36309ef1c
Bump eslint & update CS
6 years ago
Ted Ge
d533c27017
fix normalize function name ( #538 )
6 years ago
Michal Grňo
6847c9481f
It's "typographic", not "typographyc"
6 years ago
Alex Kocharin
04d36a3f1a
Fix smartquotes around softbreaks
close https://github.com/markdown-it/markdown-it/issues/430
7 years ago
Alex Kocharin
9335394a99
Disable replacements inside autolinks
close https://github.com/markdown-it/markdown-it/issues/272
8 years ago
Alex Kocharin
6dbe532460
Replace standalone CR with LF when normalizing newlines
fix #252
9 years ago
Vitaly Puzrin
760050edcb
eslint update & code cleanup
9 years ago
Alex Kocharin
946b1a1961
Take into account adjacent tokens in smartquotes
close https://github.com/markdown-it/markdown-it/issues/181
9 years ago
Alex Kocharin
b2aee1a978
Expand tabs only when it's needed, as per CommonMark 0.21
10 years ago
Alex Kocharin
a7b2b3b4e8
Add multichar replacements in smartquotes
fix #115
10 years ago
Vitaly Puzrin
cc87145842
Regex workagound for phantomjs, related to #77
10 years ago
Alex Kocharin
e91574c391
Smartquote rule cleanup
10 years ago
Vitaly Puzrin
7075e8881f
Updated and optimized call
10 years ago
Alex Kocharin
e173111e40
Remove stateCore.push() method
10 years ago
Vitaly Puzrin
84375344d2
Simplified replacer
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
141308d1a7
Fix protocol-less urls from linkifier
Linkifier might send raw hostnames like "example.com", where url
starts with domain name. So we prepend http:// in those cases,
and remove it afterwards.
10 years ago
Alex Kocharin
77e8b6cad0
Add configurable url normalizers
- md.normalizeLink
- md.normalizeLinkText
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
Vitaly Puzrin
9ae876b0fe
Splitted replacements & smartquotes to smaller functions
10 years ago
Vitaly Puzrin
00117cb2e7
Changes to improve speed on node 0.12 & iojs
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
Alex Kocharin
552c130b21
Improve smartquotes handling
Use implementation similar to the new emphasis one.
10 years ago
Vitaly Puzrin
9159018e2a
Replaced `autolinker` with `linkify-it`, closes #2
10 years ago
Vitaly Puzrin
ba460b1a71
Removed unused code
10 years ago
Vitaly Puzrin
a0e122fb4e
deps update
10 years ago
Vitaly Puzrin
9783b530db
Added to top enable/disable methods & errors throw
10 years ago
Vitaly Puzrin
584e55861c
Moved input normalization to core chain
10 years ago
Vitaly Puzrin
90e5a9c9cc
Bulk rules rename (unify)
10 years ago
Vitaly Puzrin
57d56c43fb
Removed footnote rules (move to plugin)
10 years ago
Vitaly Puzrin
c0ccaa79ce
Removed abbr rules (move to plugin)
10 years ago
Alex Kocharin
8cb29935a3
Move reference rule to the block chain
10 years ago
Alex Kocharin
3a3904ad79
Move abbreviations from core to a block chain
10 years ago
Vitaly Puzrin
a66e29f8d0
Place md link to states and remove other aliases
10 years ago
Vitaly Puzrin
56001200c0
Added link target attribute support for plugins
10 years ago
Vitaly Puzrin
193e94cb61
apidocs: updates + added Ruler docs
10 years ago
Alex Kocharin
f7edb05ef8
Forbid nested brackets in references
This applies to footnotes/abbrs as well, because they are
designed to be implemented in the similar way.
10 years ago
Vitaly Puzrin
4a34e7b742
Moved array element subst to utils
10 years ago
Vitaly Puzrin
8a67cb3a83
Do browserified output ascii-friendly
10 years ago
Alex Kocharin
19e1aa28ea
use .toUpperCase() for link normalization
because __proto__ has magic and __PROTO__ doesn't
+ comments for the rest of ':' stuff
10 years ago
Vitaly Puzrin
671fd4f3ed
eslint rules & coding style update
10 years ago
Alex Kocharin
1ff69abeba
Fix arbitrary keys in refs/footnotes/abbrs
10 years ago