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
Baoshuo Ren
940459e654
fix: remove outdated comments ( #891 )
ref: f52351499b
2 years ago
Tobias Speicher
e6d1bfdee1
refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
3 years ago
Alex Kocharin
f52351499b
Remove (p) => § replacement in typographer
close https://github.com/markdown-it/markdown-it/issues/763
3 years ago
Alex Kocharin
6b58ec4245
Add linkifier rule to inline chain for full links
prevents emphasis from appearing in `http://example.org/foo._bar_.baz `
3 years ago
Alex Kocharin
75037c6514
Put escape sequences into separate token
3 years ago
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
5 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
9 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