-
Notifications
You must be signed in to change notification settings - Fork 167
Escape right square brackets #187
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
Escape right square brackets #187
Conversation
As discussed in matthewwithanm#148, right square brackets need to be escaped for correct handling in links in some cases. This is an alternative to that PR that is based on current sources and adds the requested testcase, since there was no response to the request in that PR for a testcase to be added to the testsuite.
@jsm28 - thinking out loud - what do you think of escaping |
Literally in |
@jsm28 - you're right, thanks for pointing that out. We are increasingly finding cases where functions need to make decisions based on enclosing elements, but I think we need a generalized and efficient context-propagation mechanism similar to We could test for |
@jsm28 - would you be willing to convert your fix to be conditional on being within an |
@jsm28 - I merged #1: only escape closing square brackets inside tags Let me know what you think. My preference is to avoid unnecessary escaping, but if you can think of a scenario that breaks this proposal, then we shouldn't do it. |
…ping only escape closing square brackets inside <a> tags
@jsm28 - upon reflection, I think your original proposed change to always escape closing brackets was more straightforward. This is also what Pandoc does:
I reverted the code back to your original proposal and merged it. Thanks for your contribution! |
As discussed in #148, right square brackets need to be escaped for correct handling in links in some cases. This is an alternative to that PR that is based on current sources and adds the requested testcase, since there was no response to the request in that PR for a testcase to be added to the testsuite.