mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Markdig outputs headings with id attribute and content #376
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Abrahamlet on GitHub (Jul 1, 2020).
Hello,
When using Markdig, any headings I create get output as html with an id attribute. Not only that, the value of the id attribute is equivalent to the value of the headings themselves.
Here's some sample code:
And here's the output:
Can someone tell me what I'm doing wrong here?
Thanks,
Abrahamlet
PS: If it helps, I'm using Markdig version 0.17.0
@xoofx commented on GitHub (Jul 10, 2020):
Don't know, maybe something is conflicting with
DisableHtml, can you try without it?@Abrahamlet commented on GitHub (Jul 10, 2020):
@xoofx I tried that. Issue persists.
@xoofx commented on GitHub (Jul 10, 2020):
Can you try with latest version and show exactly the program you are running?
@xoofx commented on GitHub (Jul 10, 2020):
For instance on babelmark here Markdig is working correctly.
@Abrahamlet commented on GitHub (Jul 10, 2020):
Issue still persists.
My code looks like this (using VB.NET in LinqPad):
It doesn't matter if I use .DisableHtml or not. I get the same thing. And this is after upgrading from version 0.17.0 to 0.20.0.
@xoofx commented on GitHub (Jul 10, 2020):
I just ran it and it is working:
So I don't know, maybe it is an issue with VB, maybe something else on your side.
@Abrahamlet commented on GitHub (Jul 10, 2020):
It's not working. The h1 tag isn't supposed to have an ID attribute at all. Your results are the same as mine.
@xoofx commented on GitHub (Jul 11, 2020):
Yes, it is working and it is super confusing.
You said:
This is not what I see above when running it, and now you are saying "same as mine"
But also, why are you using advanced extensions in the first place then? Advanced extensions are activating - among others - the AutoIdentifier extension, so it is doing what you are asking for.
If you don't want ids, you should not use advanced extensions in your pipeline:
@Abrahamlet commented on GitHub (Jul 12, 2020):
I didn't know using the advanced extensions made ids appear. I removed it and now it works as expected.
Thanks for your help, @xoofx