Closed naokazuterada closed 6 years ago
Problem
On GFM, the words between[
and]
seems to be escaped always, so we should escape it if we want it exists. But this is maybe conflicting Markdown specification.
Idea
autolink=true
and bracket=round
Headings containing rendered underscores are also affected by this issue. That is, the anchors when displayed on GitHub do not match.
Test GFM:
<!-- MarkdownTOC depth=0 autolink=true bracket=round -->
<!-- /MarkdownTOC -->
# 1 test_x
# 2 test _x_
# 3 test _x
# 4 test x_
Expected (GitHub anchors):
- [1 test_x](#1-test_x)
- [2 test _x_](#2-test-x)
- [3 test _x](#3-test-_x)
- [4 test x_](#4-test-x_)
Actual:
- [1 test_x](#1-testx)
- [2 test _x_](#2-test-x)
- [3 test _x](#3-test-x)
- [4 test x_](#4-test-x)
Removing _
from id_replacements
doesn't fix the issue:
- [1 test_x](#1-test_x)
- [2 test _x_](#2-test-_x_)
- [3 test _x](#3-test-_x)
- [4 test x_](#4-test-x_)
@ZimbiX Thank you for reporting. I will take a look 👀
Fixed in 3.0.0.
should be