git.iko.soy/typeable/pandoc
on master help sign in
Make `--ascii` work with DocBook output too.
commit3a1a50a45fb4e2fe2f4f03297e2428ec51059ea9 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 25 Feb 2017, 13:34 (10 years ago) parent7d0082a
2 files changed+6−3
MANUAL.txt+2−2 src/Text/Pandoc/App.hs+4−1
MANUAL.txt+2−2
@@ -646,8 +646,8 @@ Options affecting specific writers
646646
647647`--ascii`
648648
649−: Use only ASCII characters in output. Currently supported only
650− for HTML output (which uses numerical entities instead of
649+: Use only ASCII characters in output. Currently supported only for
650+ HTML and DocBook output (which uses numerical entities instead of
651651 UTF-8 when this option is selected).
652652
653653`--reference-links`
src/Text/Pandoc/App.hs+4−1
@@ -411,7 +411,10 @@ convertWithOpts opts = do
411411 selfcontain = if optSelfContained opts && htmlFormat
412412 then makeSelfContained writerOptions
413413 else return
414− handleEntities = if htmlFormat && optAscii opts
414+ handleEntities = if (htmlFormat ||
415+ format == "docbook4" ||
416+ format == "docbook5" ||
417+ format == "docbook") && optAscii opts
415418 then toEntities
416419 else id
417420 output <- f writerOptions doc'