-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lists with code fences work incorrectly if code contains "[" symbol #712
Comments
Why did you add the backslashes? What is the output you expect from that source? |
@Feder1co5oave I added backslashes to prevent parsing this markdown here (by github). Actual source input.md has no "". |
Ouch, you're right. This does look nasty! diff --git a/lib/marked.js b/lib/marked.js
index 0711b00..d4e34e9 100644
--- a/lib/marked.js
+++ b/lib/marked.js
@@ -19,7 +19,7 @@ var block = {
nptable: noop,
lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
- list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
+ list: /^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
table: noop, However that lists regex definitely needs to be reviewed. You can also easily work around this by putting a space between the |
input.md:
In
token
method "list" rule captures list items:here
src
will be:I added "" before block fence.
The text was updated successfully, but these errors were encountered: