diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-04-26 09:44:31 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-04-26 12:23:25 -0700 |
commit | e3d05171f3661008a3377c2b0f793fc846cfe497 (patch) | |
tree | 7b254be6243ac312fefa4057988fa33dde887e8b | |
parent | 3ed4861c6290ab51cc45ba585237b33d96a0c03c (diff) | |
download | pandoc-e3d05171f3661008a3377c2b0f793fc846cfe497.tar.gz |
Make `--ascii` work for all XML formats (ICML, OPML, JATS,...).
Also document in manual.
-rw-r--r-- | MANUAL.txt | 7 | ||||
-rw-r--r-- | src/Text/Pandoc/App.hs | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 938bacf20..a68e8efbf 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -830,9 +830,10 @@ Options affecting specific writers `--ascii` -: Use only ASCII characters in output. Currently supported only for - HTML and DocBook output (which uses numerical entities instead of - UTF-8 when this option is selected). +: Use only ASCII characters in output. Currently supported for + XML and HTML formats (which use numerical entities instead of + UTF-8 when this option is selected) and for groff ms and man + (which use hexadecimal escapes). `--reference-links` diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index b5683ca87..99277d434 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -516,8 +516,9 @@ convertWithOpts opts = do escape | optAscii opts , htmlFormat || format == "docbook4" || - format == "docbook5" || format == "docbook" = - toEntities + format == "docbook5" || format == "docbook" || + format == "jats" || format == "opml" || + format == "icml" = toEntities | optAscii opts , format == "ms" || format == "man" = groffEscape | otherwise = id |