I am using Pandoc's extention of markdown to produce HTML.
The following markdown:
#test{#specificId}
##test2
###test3
Produces the following html
<h1 id="specificId">test</h1>
<h2 id="test2">test2</h2>
<h3 id="test3">test3</h3>
Ideally, It would produce this:
<h1 id="specificId">test</h1>
<h2>test2</h2>
<h3>test3</h3>
I couldn't find an option in the documentation that would make the output only add an ID if it was explicitly added to the markdown although I don't really know what to search for.
Thanks in advance for any help.
Pandoc is a command-line tool for converting files from one markup language to another. Markup languages use tags to annotate sections of a document. Commonly used markup languages include Markdown, ReStructuredText, HTML, LaTex, ePub, and Microsoft Word DOCX.
An extension can be enabled by adding +EXTENSION to the format name and disabled by adding -EXTENSION . For example, --from markdown_strict+footnotes is strict Markdown with footnotes enabled, while --from markdown-footnotes-pipe_tables is pandoc's Markdown without footnotes or pipe tables.
You can't. You can try opening the PDF in Word or Google Docs and saving in a format from which pandoc can convert directly.
pander: An R 'Pandoc' WriterContains some functions catching all messages, 'stdout' and other useful information while evaluating R code and other helpers to return user specified text elements (like: header, paragraph, table, image, lists etc.)
I found the answer.
The "feature" is called auto_identifiers
. It can be disabled in the command by changing -f markdown
to -f markdown-auto_identifiers
Hope this helps someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With