You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct, the difference between markdown and commonmark here is all about whether <abc> is parsed as block or inline HTML. Pandoc's markdown reader parses it as inline; you get the space because there's a space (to be exact, a SoftBreak) between the two inline elements: the (non-rendered) raw HTML and the string 'x'.
HTML is different because raw_html extension is disabled by default for HTML. If you turn it on, you'll have exactly the same results: pandoc --from html+raw_html --to rst.
It should still be possible to change pandoc so that, even with <abc> parsed as an inline tag, you don't get the extra space. (This is especially important in RST, since the space will change the semantics.) Perhaps Text.Pandoc.Pretty should be modified so that a BreakingSpace at the beginning or end of a Doc is not rendered. This would make sense to me, and it would fix the issue. You could still use text " " <> foo to get a space at the beginning if you wanted one, but space <> foo would not produce that.
It is expected that unsupported HTML tags get stripped out, but this should not insert a space in the beginning of the next line.
Note that in LaTeX that may not be a problem, but in reST, the indentation creates an unwanted "blockquote".
Interestingly, this does not happen with HTML input:
The text was updated successfully, but these errors were encountered: