-
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
Bug with asterisks (if this is the current version of GFM on GitHub) #520
Comments
It also fails at a very simple:
Result should look like:
http://johnmacfarlane.net/babelmark2/?normalize=1&text=text+text+*five+\*+six* |
Anyone got fix for this . |
This still fails: text text *five \*six* text <p>text text <em>five \</em>six* text</p> |
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: Line 564 in c99e69b
Fix: em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*\\])\*(?!\*)|^\*([^\s"<\[][\s\S]*?[^\s*\\])\*(?!\*)/, |
@rtxa you should create a PR so it can be tested by our test suite |
Sorry to dig up this issue, but is there any updates on this issue? Seems it's still present as of v1.2.2. |
There are still some issues with em but it looks like the original bug is fixed:
@01010101lzy if you have other markdown that is not working you can create a different issue. |
The problem mentioned in the first reply of this issue (asterisks are not properly escaped) is still lying around unfortunately... |
@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. 😁 |
Sorry if this is filed incorrectly, but strings like this are not formatted correctly:
Test *italic here **bold italic here** and italic still* end
See also http://ajh.us/babelmark2-asterisks-bold-in-italic-test
The text was updated successfully, but these errors were encountered: