We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandoc documentation says:
pandoc
A header without an explicitly specified identifier will be automatically assigned a unique identifier based on the header text.
However, pandoc assigns an identifier even if identifier is already set, causing incorrect HTML output:
$ ~/.cabal/bin/pandoc --version pandoc 1.15.0.6 Compiled with texmath 0.8.3, highlighting-kate 0.6. ... $ cat input.md # Chapter 1 {id="ch01"} text $ ~/.cabal/bin/pandoc -f markdown -t html -o output.html input.md $ cat output.html <h1 id="chapter-1" id="ch01">Chapter 1</h1> <p>text</p>
Note: h1 tag has two id attributes.
h1
id
The text was updated successfully, but these errors were encountered:
The standard way to set an id in pandoc is
# Chapter 1 {#ch01}
If you do it this way, it will work the way the docs say. But probably we should ensure that if someone says id=foo, it has the same effect.
Sorry, something went wrong.
@van-de-bugger,
from this source:
# Chapter 1 {#ch1} # Chapter 2 {id="ch2"}
you will have this HTML output (using latest stable pandoc):
<h1 id="ch1">Chapter 1</h1> <h1 id="chapter-2" id="ch2">Chapter 2</h1>
Extended Markdown requires identifiers tagged as {#identifier} and classes as {.class}.
{#identifier}
{.class}
Just in case it might help.
Thanks, I am aware about {#id} syntax, but I think {id="id"} is also valid.
{#id}
{id="id"}
dcb0b02
No branches or pull requests
pandoc
documentation says:However,
pandoc
assigns an identifier even if identifier is already set, causing incorrect HTML output:Note:
h1
tag has twoid
attributes.The text was updated successfully, but these errors were encountered: