gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.41k stars 173 forks source link

id set in block level attributes and auto-generated id both present #206

Closed zigo101 closed 2 years ago

zigo101 commented 2 years ago

Maybe, if id is set in a block level attribute for a block, then the auto-generated id for the block should not present?

miekg commented 2 years ago

[ Quoting @.***> in "[gomarkdown/markdown] id set in blo..." ]

Maybe, if id is set in a block level attribute for a block, then the auto-generated id for the block should not present?

I had to check, but the ID from the block level attribute gets precedent.

{#bli}
# another section

results in (using mmark):

<section anchor="bli"><name>another section</name>
</section>

Even with explcitid ID on the header the block level attribute is used.