-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Wrongly successively encoding entities in code blocks in nested lists #196
Comments
NB: markdown seems to require escaping "&" and "<", but, as mentioned above, the problem is also visible with characters that lead to non-mandatory entity encoding such as ">" as in this example (which is this time a proper markdown document): |
This bug was introduced recently. I'm still trying to figure out which commit introduced this. |
I've tracked the problem to version 1.2.1, commit 5f043ca introduced the problem |
This should be fixed in the latest develop |
Great, thanks. (not tested yet) |
When using an entity (or a character that gets encoded as an entity) in a code block in a list, showdown seems to escape the entity multiple times, depending on the depth in the list.
Here is an example, where all & (using explicitly & does not change the problem) inside code blocks get escaped too much:
http://showdownjs.github.io/demo/#/%23%23%20Test%20pre%20in%20a%20list%0A-%20%26%0A-%20%60%26%60%0A%20%20%20%20-%20%26%0A%20%20%20%20-%20%60%26%60%0A%20%20%20%20%20%20%20%20-%20%26%0A%20%20%20%20%20%20%20%20-%20%60%26%60%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20%26%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20%60%26%60
I discovered the problem outside the demo (i.e., I think the problem does not come from the demo code).
I'll have a quick look but I'm not familiar with the showdown code so I will most probably not manage to solve the problem.
The text was updated successfully, but these errors were encountered: