Federico Soave
d0aa0b1a08
allow the closing fence to be longer that the opening one (pass cm example 93)
2018-12-08 13:01:36 +01:00
Federico Soave
67a5941f4d
require closing fence to be on a new line ( fix #1058 ), while still allowing empty code blocks
2018-12-08 12:56:04 +01:00
Steven
06297df672
Merge pull request #1384 from UziTech/url-case-insensitive
...
Make autolinks case insensitive
2018-12-06 16:16:38 -05:00
Anis Ladram
dbaac49878
Changed order of autolink processing
2018-12-05 19:56:39 -05:00
Tony Brix
917a1d46af
make links case insensitive
...
closes #1350
2018-12-05 11:29:13 -06:00
Tony Brix
13868676a4
Remove trailing space
...
Co-Authored-By: RomanGotsiy <gotsijroman@gmail.com>
2018-12-05 16:31:24 +02:00
Roman Hotsiy
3778730c8f
Fix emphasis followed by a punctuation ( fixes #1378 )
2018-12-05 11:31:31 +02:00
Aprotim Sanyal
01ce9d9b9e
Fix lint errors
2018-10-17 17:05:25 -07:00
Aprotim Sanyal
27d2619181
Fix where I accidentaly overwrote a change upstream
2018-10-17 16:55:00 -07:00
Aprotim Sanyal
527e24db2a
Move URL handling (incl. sanitization) into a helper
2018-10-17 16:30:57 -07:00
Roman Hotsiy
92509479e4
fix emphasis closing by single _ part of right-flanking run
...
fixes CommonMark: 456, 355, 451, 354, 356
2018-10-08 15:34:45 +03:00
Steven
bcace20a30
Add missing semicolons
2018-09-23 20:27:20 -04:00
Tony Brix
9dc6996d1c
fix a few more spec examples
2018-09-18 16:33:23 -05:00
Tony Brix
3271b8b62e
fix inline code regex
2018-09-18 16:29:11 -05:00
Federico Soave
8117b56a2e
[gfm] only do backtracking (extended autolink path validation) for www or http autolinks
2018-09-18 21:34:10 +02:00
Federico Soave
984c365aeb
[gfm] use new extended email autolink rule to avoid autolinking email addresses in code spans ( fixes #1218 )
2018-09-18 21:26:09 +02:00
rich
d604680a6a
Prevent matching other content that starts with these words
2018-09-16 15:57:12 +01:00
rich
f09095ef0e
Use neater alternation in regexes for improved readability
2018-09-16 08:16:33 +01:00
rich
4ba30dba6b
[ #1334 ] turn off typographic substitution in certain blocks
2018-09-15 11:22:47 +01:00
Костя Третяк
eb9f08cbb3
Refactoring the old escape() function improved performance on 30-40%
2018-09-11 17:18:38 +03:00
Raphaël Huchet
c4851d0492
update copyright
2018-08-27 10:22:45 +02:00
Barry Woolgar
431884f6a6
Remove commented line
2018-08-15 15:39:24 +01:00
Barry Woolgar
0ba25227cd
Exclude punctuation to make 333, 450, 452, 505, and 535, pass
2018-08-03 19:49:10 +01:00
barrywoolgar
a4460a9301
Updated inline grammer regexes for strong and em
...
Attempt to match special case single character matches before the more permissive standard regexes
2018-08-02 18:27:40 +01:00
Josh Bruce
706e07dbad
Merge pull request #1304 from UziTech/loose-lists
...
loose lists
2018-07-14 18:33:29 -04:00
Steven
c7d487e452
Merge pull request #1258 from tomtheisen/gfm-strike
...
GFM strikethrough compatibility
2018-07-09 12:34:01 -04:00
Steven
51cd03f525
Merge pull request #1305 from Trott/enable-468
...
enable CommonMark spec 468
2018-07-06 15:46:55 -04:00
Steven
2f86d9439f
Merge pull request #1303 from aduh95/patch-1
...
add hard line break when backslash at EOL
2018-07-06 15:42:28 -04:00
Steven
485fcae321
Merge pull request #1293 from Trott/trailing-period
...
fix gfm extended autolinking requiring multiple backpedals
2018-07-05 09:55:57 -04:00
Rich Trott
9c976cda1c
enable CommonMark spec 468
...
A minor adjustment to the href-matching regexp permits CommonMark spec
468 to pass. All other passing specs are unaffected.
The regexp was incorrectly excluding parentheses as valid characters in
a URL.
2018-07-03 11:43:01 -07:00
Tony Brix
b167cd410c
remove loose_item_start token
...
fixes #469
2018-07-03 08:33:51 -05:00
Tony Brix
a22ef0f4a4
loose lists
2018-07-03 08:23:03 -05:00
Antoine du Hamel
47cf2b2cf2
add hard line break when backslash at EOL
...
A backslash at the end of the line is a hard line break.
Ref: https://spec.commonmark.org/0.28/#example-293
2018-07-03 10:43:21 +02:00
Rich Trott
04e04b10d4
fix issues link references and prototypes
...
Link with names that clashed with properties inherited from the
Object prototype (such as "constructor") were not expanding. This fixes
this issue.
Before this change, markdown of this form...:
Link: [constructor][].
[constructor]: https://example.org/
...resulted in HTML output of this form:
<p>Link: [constructor][].</p>
With this change, it now renders as expected:
<p>Link: <a href="https://example.org/ ">constructor</a>.</p>
2018-06-28 13:41:43 -07:00
Rich Trott
a3cddeeae6
fix gfm extended autolinking requiring multiple backpedals
...
Add a test and fix that trailing punctuation is omitted in link URLs for
markdown like this:
(See https://www.example.com/fhqwhgads .)
The trailing period and closing parenthesis should not be part of the
link URL.
2018-06-22 13:51:48 -07:00
Steven
05e322c69b
Merge pull request #1262 from UziTech/table-cells
...
Fix table cells
2018-06-12 11:49:29 -04:00
Tony Brix
898f61294d
add comments for clarity
2018-06-04 15:23:55 -05:00
Steven
37a9f1f742
Merge pull request #1260 from davisjam/Rtrim
...
security: use rtrim, not unsafe /X+$/
2018-06-03 15:26:46 -04:00
Jamie Davis
0610f9f9a4
remove unnecessary if check
2018-06-02 14:12:17 -04:00
Jamie Davis
2e05c777ac
address review comments
2018-06-02 01:24:55 -04:00
Steven
0bc2fc5b6d
Merge pull request #1265 from remyrylan/master
...
CommonMark code block class names
2018-05-11 13:29:38 -04:00
Remy Rylan
6ab2593530
Remove extra inner linebreak from code blocks
2018-05-11 11:20:29 -04:00
Remy Rylan
7b1d0be249
Update fenced code blocks to CommonMark standard
2018-05-11 11:12:12 -04:00
Tony Brix
2c17a5a1ec
test pass
2018-05-09 16:27:30 -05:00
Jamie Davis
7e5a72703d
security: rtrim, not unsafe /X+$/ idiom
...
Problem:
replace(/X+$/, '') is vulnerable to REDOS
Solution:
Replace all instances I could find with a custom rtrim
2018-05-09 11:07:20 -04:00
Tom Theisen
22b17fec26
Merge branch 'master' of https://github.com/markedjs/marked into gfm-strike
2018-05-08 20:32:01 -07:00
Steven
42c3915242
Merge pull request #1250 from tomtheisen/gfm-tasks
...
GFM compliance for tasks lists
2018-05-08 11:26:46 -04:00
Tom Theisen
1420eb3435
Strikethrough support for GFM
2018-05-05 08:21:32 -07:00
Tom Theisen
b083a1a307
space following task checkbox
2018-05-03 19:52:57 -07:00
Tom Theisen
aa73bb6ea7
add space to task regex and disable xhtml for gfm testing
2018-05-03 19:51:31 -07:00