Closed jitendersandhu closed 7 years ago
I think we could make this smarter! Trailing special characters probably should not be in the header link. Any chance you could write a PR? It would be nice to have a flag to keep the old behavior in case someone already depends on it (or perhaps generate a second anchor with the old URL as well in the same spot so we don't need a new flag)
Thanks for a quick response!
Trailing special characters probably should not be in the header link.
My use case here is an FAQ
doc, where header-links
are the questions
itself, i was thinking it would nice to include the question mark
and have both markdown-styles
and DocToc
work at same time.
keep the old behavior in case someone already depends on it
Totally agree, definitely the old behavior should be intact.
Any chance you could write a PR?
Sure, I will try to give it some time (though, I may not be able to get to it for another week or two ☺).
Meantime, if you want to close this issue, it's totally fine and i will re-open if i'm able to work on this PR.
Thanks again!
fixed in v.3.1.9
(the rules around anchor links were relaxed to support Chinese characters)
Hi,
Firstly, thanks for this awesome tool!
I am facing an issue with
header links
, when themarkdown(.md)
files are converted intoHTML
, thequestion(?)
mark in theheader links
is replaced with ahyphen(-)
. This is causing problem for me since, I am using DocToc to create aTable of Contents
for the document and theDocToc
, removesquestion mark
while generating links insideTable of Contents
.As per my understanding, this is happening due to the following line in
renderer.heading
function insidemarkdown-styles/lib/convert-md.js
file.Is there a way to configure
markdown-styles
to simply remove any special character likequestion(?)
mark whenheader links
are generated.Though, I am not sure whether this is intended or a bug. Any help would be highly appreciated!