Skip to content

Wrongly successively encoding entities in code blocks in nested lists  #196

@twitwi

Description

@twitwi

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions