36 Commits

Author SHA1 Message Date
Tony Brix
6355ac2d6f
fix: fix indented code in list item (#1762) 2020-10-21 09:38:23 -05:00
Tony Brix
dddf9ae72c
Merge pull request #1686 from calculuschild/EmphasisFixes 2020-07-13 08:34:55 -05:00
Trevor Buckner
6b729ed8cd Merge branch 'EmphasisFixes' of https://github.com/calculuschild/marked into EmphasisFixes 2020-07-09 19:37:22 -04:00
Trevor Buckner
e27e6f960f Sorted strong and em into sub-objects 2020-07-09 19:35:22 -04:00
Trevor Buckner
ad720c1cba
Make emEnd const
Co-authored-by: Tony Brix <tony@brix.ninja>
2020-07-09 10:54:08 -04:00
Trevor Buckner
1fb141d275
Make strEnd const
Co-authored-by: Tony Brix <tony@brix.ninja>
2020-07-09 10:53:48 -04:00
Trevor Buckner
226bbe70b7 Lint 2020-07-08 17:01:42 -04:00
Trevor Buckner
cc778ade42 Removed redundancy in "startEM" check 2020-07-08 16:58:58 -04:00
Trevor Buckner
211b9f9a20 Removed Lookbehinds
Beginning and End delimiters for EM and Strong must be searched in a separate regex to work without lookbehinds. This invalidates the regex that skips over blocks (code, html, etc.) that take precedence over EM or Strong blocks.

Getting around this means we must now mask not only reflinks, but all enclosed blocks which were previously just skipped over in the Regex.

Add one check for overlapping Strong block when testing EM, now passes Commonmark 390 and 471
2020-07-08 16:00:12 -04:00
Trevor Buckner
4e7902ec11 Gaaaah lint 2020-06-30 17:50:19 -04:00
Trevor Buckner
4db32dc180 Links are masked only once per inline string 2020-06-30 17:49:11 -04:00
Tony Brix
d233fd5806 mask reflinks 2020-06-20 10:25:48 -05:00
jun-sheaf
fcfe15fba6 Fixed Example 272 2020-06-17 18:28:37 +02:00
Randolf C
1f77fb0782
Update src/Tokenizer.js
Co-authored-by: Tony Brix <tony@brix.ninja>
2020-06-17 17:27:28 +02:00
Trevor Buckner
e926e0cbfe Lint... 2020-06-17 11:08:11 -04:00
Trevor Buckner
335a6601d4 Added fixes to Strong
Fixes examples 391, 397, 399, 400, 401, 431, 443, 475, 476, 479, and 480
2020-06-17 11:06:25 -04:00
Trevor Buckner
4cbba074d6 Moved logic into Tokenizer. No longer injecting Reflinks
Reflinks are replaced with the string 'aaaa' of equal length to hide any asterisks or underscores that might have been inside, since these should not be included. Then, the resulting string is matched to the em regex. The positions of the captures are then used on the original string.
2020-06-17 00:41:06 -04:00
Trevor Buckner
556070bffc Updated rules for underscore em
Now fixes three more cases
2020-06-12 16:29:25 -04:00
Trevor Buckner
bc17deddb6 Lint 2020-06-12 15:37:18 -04:00
Randolf C
7118e4de01
Update Tokenizer.js 2020-06-12 16:03:38 +02:00
Randolf C
94bc32e900
Update Tokenizer.js 2020-06-12 16:00:36 +02:00
Trevor Buckner
4e2ec90374 Now passes several more tests
Added a check for the previous character to the  *em* Tokenizer. Needed to pass any tests where the em block starts with a punctuation character (e.g. commonmark example 368)
2020-05-29 16:25:46 -04:00
Tony Brix
48448cc24f fix image links with escaped brackets 2020-05-19 15:58:33 -05:00
Tony Brix
cb42b9003c add list_item type to list item token 2020-05-12 19:57:27 -05:00
Steven
0a57e47d11
Merge pull request #1652 from UziTech/codespan-newline
Codespan newline
2020-05-03 15:19:53 -04:00
Ivan Demidov
56bf2308bf perf: throw error if raw undefined 2020-04-28 08:52:20 +03:00
Ivan Demidov
228f0a61ca perf: get match indent to code 2020-04-27 09:17:48 +03:00
Ivan Demidov
eb71dd8f4a perf: after review 2020-04-24 12:59:47 +03:00
Tony Brix
c2d6d2fa31 only strip spaces 2020-04-24 01:00:27 -05:00
Tony Brix
143ae5d09a fix codespan spaces 2020-04-24 00:39:47 -05:00
Tony Brix
8b638b7c82 fix codespan with newline 2020-04-23 23:24:28 -05:00
Ivan Demidov
0705c629a9 perf: move compensation to tokenizer 2020-04-21 10:55:17 +03:00
Tony Brix
4117ba271f move smartypants, mangle, and rules to lexer 2020-04-14 16:40:06 -05:00
Tony Brix
4947ce5078 only send needed variables to tokenizer 2020-04-14 13:29:51 -05:00
Tony Brix
b63156f938 update docs 2020-04-08 13:04:38 -05:00
Tony Brix
17d81796da add tokenizer 2020-04-08 13:04:29 -05:00