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
Having any html tag seems to break the smart quote conversion. The ellipsis conversion seems fine. The smart quotes seem to convert correctly when a markdown version of this is used (e.g. "Hello *world*..." "Hello world..."). Am I missing something or is this a bug?
The text was updated successfully, but these errors were encountered:
The issue is that in the HTML reader we apply smartPunctuation only in parsing tag contents. So it only works, as it were, between tags. The reasons for this are a bit complex: the HTML reader parses a string of tokens produced by an HTML5 tokenizer. So we can't use our existing smart punctuation code, which operates on strings, on that -- but we can use it on the tag contents.
One could simply duplicate smart punctuation parsing logic using token parsers in the HTML reader, for a better solution. (Crossed out 'simply' because it's not that simple; I guess it would require splitting tag contents so that quotes were separately recognizable tokens.)
Version: 1.19.2.1
Command:
pandoc -o output.html input.html -S
input.html
"Hello <em>world</em>..." "Hello world..."
output.html
"Hello <em>world</em>…" “Hello world…”
Expected:
“Hello <em>world</em>…” “Hello world…”
Having any html tag seems to break the smart quote conversion. The ellipsis conversion seems fine. The smart quotes seem to convert correctly when a markdown version of this is used (e.g.
"Hello *world*..." "Hello world..."
). Am I missing something or is this a bug?The text was updated successfully, but these errors were encountered: