Closed TheBestPessimist closed 5 years ago
Thanks again for reporting.
MarkdownTOC creates id(#id-server---migration-script
) for heading 'ID Server - Migration Script'.
And it works on Github.
Please let me know your presentation environment (Gitlab, Marked2, etc.) and also id string you expected(Please check the HTML source code, what is id string of heading?).
Though this is an ugly workaround, you can avoid it with "Manipulation of auto-link ids" feature.
Add into your configuration.
"id_replacements": [
{
"pattern": "---",
"replacement": "-"
}
]
this changes #id-server---migration-script
to #id-server-migration-script
Please let me know your presentation environment
I'm sorry, but idk what to show you. Can you give me details/steps?
I just edit my HUGE markdown file, then press ctrlB and a tab is opened into chrome with the contents of my markdown as html.
If i think about it, probs that page is rendered with https://packagecontrol.io/packages/MarkdownPreview, since i also have this plugin installed.
Yes, it seems that i have configured Markdown Preview only halfway. As per the docs https://facelessuser.github.io/MarkdownPreview/usage/ after i added
"github_inject_header_ids": true,
Those links work nicely!
As a reference for other people (maybe add this info to readme) here's my MarkdownPreview User settings
:
{
// "parser": "markdown",
"parser": "github",
"build_action": "browser",
"github_oauth_token": "leepic",
"github_mode": "gfm",
"github_inject_header_ids": true,
}
Sorry for wasting your time on this :(
@TheBestPessimist Oh, sorry for my bad English. I mean 'What do you use for rendering markdown as HTML?'. So you showed me the right answer I want to know.
MarkdownPreview
And sorry I forgot the link too. Manipulation of auto-link ids
I'm happy to hear that you solved! And thanks for showing me your solution.
BTW, this plugin also has Markdown Preview compatible feature. So please choose from two solutions. (MarkdownTOC's config or Markdown Preview's)
BTW, this plugin also has Markdown Preview compatible feature.
Yeah, seems like i missed that (though i did read the whole readme file. 😊 )
hi @naokazuterada @TheBestPessimist
Was there something, in need of clarified in the documentation for MarkdownTOC ?
Or are there additions to the compatility matrix?
jonasbn
@jonasbn Thank you for asking! I think it's already enough.
How can the issue be reproduced
It seems that having a "-" in the heading breaks the autolink feature:
If the "-" above is deleted, the link works
What was expected
Links work.
What actually occurred
Clicking a link in the toc to go to the heading didn't work
What was the version of the involved component
3.0.4
See example file: a.md.txt