You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug with asterisks (if this is the current version of GFM on GitHub) #520
changed the title [-]Bug (if this is the current version of GFM on GitHub)[/-][+]Bug with asterisks (if this is the current version of GFM on GitHub)[/+]on Dec 5, 2014
Hi, I've fixed this by not matching the backslash character in the regex for the 5th capturing group, this needs to be tested to ensure there aren't side effects. Check this Regex demo
Activity
[-]Bug (if this is the current version of GFM on GitHub)[/-][+]Bug with asterisks (if this is the current version of GFM on GitHub)[/+]CoDEmanX commentedon Sep 4, 2015
It also fails at a very simple:
Result should look like:
http://johnmacfarlane.net/babelmark2/?normalize=1&text=text+text+*five+\*+six*
sunil-ideas2it commentedon Jan 4, 2016
Anyone got fix for this .
joshbruce commentedon Apr 13, 2018
Closing as covered by spec-compliance. See also #1106 and #1216
Feder1co5oave commentedon Dec 5, 2018
This still fails:
rtxa commentedon May 5, 2019
Hi, I've fixed this by not matching the backslash character in the regex for the 5th capturing group, this needs to be tested to ensure there aren't side effects. Check this Regex demo
Original code:
marked/lib/marked.js
Line 564 in c99e69b
Fix:
UziTech commentedon May 6, 2019
@rtxa you should create a PR so it can be tested by our test suite
lynzrand commentedon Nov 2, 2020
Sorry to dig up this issue, but is there any updates on this issue? Seems it's still present as of v1.2.2.
UziTech commentedon Nov 2, 2020
There are still some issues with em but it looks like the original bug is fixed:
demo
@01010101lzy if you have other markdown that is not working you can create a different issue.
lynzrand commentedon Nov 3, 2020
The problem mentioned in the first reply of this issue (asterisks are not properly escaped) is still lying around unfortunately...
https://marked.js.org/demo/?text=*test%5C*%20123*&options=%7B%20%22baseUrl%22%3A%20null%2C%20%22breaks%22%3A%20false%2C%20%22gfm%22%3A%20true%2C%20%22headerIds%22%3A%20true%2C%20%22headerPrefix%22%3A%20%22%22%2C%20%22highlight%22%3A%20null%2C%20%22langPrefix%22%3A%20%22language-%22%2C%20%22mangle%22%3A%20true%2C%20%22pedantic%22%3A%20false%2C%20%22sanitize%22%3A%20false%2C%20%22sanitizer%22%3A%20null%2C%20%22silent%22%3A%20false%2C%20%22smartLists%22%3A%20false%2C%20%22smartypants%22%3A%20false%2C%20%22tokenizer%22%3A%20null%2C%20%22walkTokens%22%3A%20null%2C%20%22xhtml%22%3A%20false%7D&version=master
UziTech commentedon Nov 3, 2020
@01010101lzy yes that is still an issue. If you want to you can create a different issue to track that bug. PRs are also welcome. 😁