I'm trying to convert an HTML file to Markdown using Pandoc, but I'm having a hard time finding the correct options.
I would like convert the entire HTML file to the simplest Markdown possible. That is, no <div>
tags and no CSS styling in curly brackets. However, when I input the following HTML to pandoc by calling pandoc -f html -t markdown reduced.html -o res.md
:
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<h3 name="2ee9" id="2ee9" class="graf graf--h3 graf--leading graf--title">Post Title</h3>
<p name="021f" id="021f" class="graf graf--p graf-after--h3">Preamble <a href="https://cogsci.stackexchange.com/users/4397/seanny123?tab=questions" data-href="https://cogsci.stackexchange.com/users/4397/seanny123?tab=questions" class="markup--anchor markup--p-anchor" rel="noopener" target="_blank">link</a> and conclusion.</p>
</div>
I get the following Markdown output with all the things I'd like to ignore:
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
### Post Title {#2ee9 .graf .graf--h3 .graf--leading .graf--title name="2ee9"}
Preamble
[link](https://cogsci.stackexchange.com/users/4397/seanny123?tab=questions){.markup--anchor
.markup--p-anchor} and conclusion.
</div>
</div>
I tried reading the Pandoc Markdown docs, but I couldn't find any indication of what parameters I should be using.