This would seem like a simple thing to do, but I've been unable to find an answer. I'm converting from HTML to Markdown using Pandoc and I would like to strip all attributes from the HTML such as "class" and "id".
Is there an option in Pandoc to do this?
Consider input.html
:
<h1 class="test">Hi!</h1>
<p><strong id="another">This is a test.</strong></p>
Then, pandoc input.html -t markdown_github-raw_html -o output.md
produces output.md
:
Hi!
===
**This is a test.**
without the -t markdown_github-raw_html
, you would get
Hi! {#hi .test}
===
**This is a test.**
This question is actually similar to this one. I don't think pandoc ever preserves id
attributes.
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