forked from vmg/sundown
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue vmg#125: Don't escape HTML tags in tables of contents.
Before this patch, a header like "# *A*" was displayed as "<li><em>A</em></li>" in the TOC. The error was caused by toc_header doing the HTML escaping. In the normal HTML renderer, the escaping is done by the normal_text hook. This patch uses the same handling to fix the issue.
- Loading branch information
1 parent
3afc3ec
commit 737304d
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/MarkdownTest_1.0.3/Tests/Formatting in Table of Contents.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ul> | ||
<li> | ||
<a href="#toc_0">Header with special & characters</a> | ||
<ul> | ||
<li> | ||
<a href="#toc_1">With <code>Code</code></a> | ||
<ul> | ||
<li> | ||
<a href="#toc_2">With <em>Emphasis</em></a> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> |
5 changes: 5 additions & 0 deletions
5
test/MarkdownTest_1.0.3/Tests/Formatting in Table of Contents.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Header with special & characters | ||
|
||
## With `Code` | ||
|
||
### With *Emphasis* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters