Federico Soave
ad6484b90c
!fixup 565b4a0e5b
2018-02-13 22:09:27 +01:00
Federico Soave
560c5cb13b
Merge branch 'master' into lint
2018-01-26 04:57:18 +01:00
Federico Soave
b8437b0742
fix underscore emphasis (apply commonmark flanking rule and rule 12)
2018-01-25 17:10:10 +01:00
kythyria
1c780b9985
Fix the regexes for thematic breaks
...
Commonmark and GFM both agree that -_- is literal characters, not <hr>,
as all three characters must be the same.
Also change the test harness to only look for .text and .html files
since it was choking on vim's swapfiles.
And add some tests to catch what this fixes.
2018-01-25 17:08:13 +01:00
Josh Bruce
33b444c360
Merge pull request #1033 from Feder1co5oave/quotes_in_titles
...
Make legacy test literal_quotes_in_titles pass
2018-01-24 19:31:45 -05:00
Federico Soave
fac31ed978
allow matched double quotes in link definition title (markdown.pl behavior).
...
Test literal_quotes_in_titles now passes.
fixup! c3e00590
2018-01-23 17:03:08 +01:00
Federico Soave
ca455a68de
gfm autolinks: backpedal on trailing punctuation
...
(see https://github.github.com/gfm/#extended-autolink-path-validation )
2018-01-23 16:29:31 +01:00
Federico Soave
187d46f294
email address domain must contain at least a dot and must not end with dash or underscore
2018-01-23 16:29:31 +01:00
Federico Soave
00f1f7a239
new gfm autolink rule: http/www URLs and email addresses
2018-01-23 16:29:31 +01:00
Federico Soave
a8f2d7ff6e
new rule for autolinks, adjust html rules accordingly.
...
test 574 does not pass because of url encoding FIXME)
2018-01-22 19:03:15 +01:00
Cory Forsyth
6d974b1dbf
Do not autolink a trailing "!" in a URL
...
* Expand gfm link tests to include all possible ending punctuation
2018-01-22 19:03:14 +01:00
Josh Bruce
024e378f43
Merge pull request #682 from Feder1co5oave/fix_typeerror
...
Throw error on non-string input
2018-01-20 17:16:11 -05:00
Josh Bruce
68aab24f7e
Merge pull request #1023 from Feder1co5oave/new_blockquote
...
[commonmark] Make blockquotes commonmark compliant
2018-01-20 17:14:44 -05:00
Josh Bruce
19f6afe4aa
Merge pull request #456 from Feder1co5oave/clean-segments
...
IDs of headings with inline tokens (link, em, bold...)
2018-01-20 16:09:27 -05:00
Josh Bruce
a98bad2430
Merge pull request #1013 from Feder1co5oave/fix-backticks2
...
fix backticks in inline code (replaces #503 , fixes #312 )
2018-01-20 15:46:19 -05:00
Josh Bruce
a78d51f775
Merge pull request #1014 from AndyLnd/master
...
chore: remove unused flags variable
2018-01-20 15:38:27 -05:00
Federico Soave
3bbcc885dd
[lint] fix already declared/unused variables
2018-01-20 03:21:46 +01:00
Federico Soave
565b4a0e5b
[lint] make the outer function a recognizable IIFE
2018-01-20 03:12:08 +01:00
Federico Soave
d9c471e265
[lint] fix var declarations
2018-01-20 03:12:08 +01:00
Federico Soave
1a19028b66
[lint] fix whitespace
2018-01-20 03:12:08 +01:00
Federico Soave
7e1836f547
[lint] add parens to empty constructor calls
2018-01-20 03:12:03 +01:00
Federico Soave
b2edbd6464
[lint] refactor replace() with an OOP approach. ESlint is happier.
2018-01-20 03:11:56 +01:00
Federico Soave
f45dc385d9
match setext headings just before paragraphs, then only paragraph continuations are matched inside blockquotes (see http://spec.commonmark.org/0.28/#example-197 )
2018-01-19 03:58:30 +01:00
Federico Soave
1a71ae06bf
new blockquote rule: match any paragraph-like content up to next line (laziness rule), or anything on the current line. Change paragraph rule accordingly, and make it non-greedy
2018-01-19 03:58:30 +01:00
Federico Soave
9400980e16
paragraph rule: link defs cannot interrupt a paragraph
2018-01-19 03:25:33 +01:00
Federico Soave
a5c4889cf0
link def labels cannot contain balanced brackets
2018-01-19 03:25:33 +01:00
Federico Soave
f2ebbd1601
first link definition takes precedence
2018-01-19 03:25:33 +01:00
Federico Soave
d7597f1732
allow link definitions in blockquotes too
2018-01-19 03:25:33 +01:00
Federico Soave
c3e005908e
new rule for link definitions: allow for special chars in label and title, multiline
2018-01-19 03:25:33 +01:00
Federico Soave
38f1b01036
allow escaped or balanced square brackets in shortcut reflinks
2018-01-19 03:25:33 +01:00
AndyTheGiant
958777e9fe
remove unused flags
2018-01-15 18:16:54 +01:00
Federico Soave
60738f8343
export TextRenderer for convenience
2018-01-15 03:25:26 +01:00
Federico Soave
31dffdeb23
pass only the textual part as the 'raw' argument for heading renderer
2018-01-15 03:25:18 +01:00
Federico Soave
de73c39038
strip unused argument (introduced in 2636f85)
2018-01-15 02:34:41 +01:00
Federico Soave
b2a07608e1
fix backticks in inline code ( fixes #312 )
2018-01-14 23:19:51 +01:00
Federico Soave
2c11624736
preserve trailing newlines in code fences
2018-01-12 18:02:49 +01:00
Josh Bruce
3175599eae
Merge pull request #612 from guotie/patch-1
...
Update marked.js
2018-01-09 22:44:29 -05:00
Костя Третяк
bff566720d
Revert 98ac7a4395
and a477d1d0e2
2018-01-08 19:50:03 +02:00
Josh Bruce
4a5cf949ec
Merge pull request #852 from jeremyblalock/master
...
Make erroneous / dangerous links display as text only
Slated for 0.3.10
2018-01-05 18:27:22 -05:00
Josh Bruce
99eee90c91
Merge pull request #991 from learykara/patch-3
...
Declare undeclared variables
2018-01-05 17:55:15 -05:00
Kara Leary
14fca790fc
add 'use strict' to top of function
2018-01-05 06:19:25 -10:00
Josh Bruce
398bb715c7
Merge pull request #993 from smhg/fix-ie8-regex
...
Support older regex engines
2018-01-04 22:33:28 -05:00
Josh Bruce
08d25126d9
Merge pull request #977 from KostyaTretyak/parser-fix
...
Parser fix
2018-01-04 22:02:23 -05:00
Federico Soave
1949dfdf21
handle escaped brackets in link description
2018-01-03 01:56:38 +01:00
Костя Третяк
13e97eb56b
Fix auto_links secure
...
Related to https://github.com/chjj/marked/pull/814
2018-01-02 19:05:01 +02:00
Federico Soave
1ec0bf387f
print more descriptive error messages when source is undefined (as in #979 )
2018-01-02 15:10:01 +01:00
smhg
d978de4f50
support older regex engines
2018-01-01 14:52:55 +01:00
Kara Leary
115b65e082
declare undeclared variables
...
fix for https://github.com/chjj/marked/issues/990
2017-12-27 12:11:37 -10:00
Josh Bruce
e10429e6b9
Merge pull request #629 from vincentwoo/patch-1
...
Fix small typo occur[r]ed
2017-12-25 17:08:42 -05:00
Tony Brix
cb72584c5d
escape non-mangled xss
...
fixes #926
2017-12-22 23:13:53 -06:00