|
How might I get a minimal anchor, just out of curiosity? OK, I suppose I'll just have to insert a raw into the markdown, else whatever markdown I use will end up turning into bigger HTML. |
Replies: 1 comment
|
Pandoc does this because its internal document model has no bare-anchor node. When it reads There is no markdown or AST construct that maps back to a lone So relying on |
Pandoc does this because its internal document model has no bare-anchor node. When it reads
<a id="w"></a>, the only thing it can represent is an inline with an id and no other content, which is aSpan:Span ("w",[],[]) []. On the way out, an inline has to live inside a block, so it gets wrapped in a paragraph, which is why you get<p><span id="w"></span></p>.There is no markdown or AST construct that maps back to a lone
<a id="...">, so keeping it verbatim as raw HTML is exactly the right move, not just a fallback. As long as theraw_htmlextension is on (it is by default for thehtmlreader and themarkdownwriter), pandoc stores the tag as aRawInline "html"and passes it through unch…