git.iko.soy/typeable/pandoc
on master help sign in
Make `--ascii` work with DocBook output too.
3a1a50aJohn MacFarlane
MANUAL.txt+2−2
@@ -646,8 +646,8 @@ Options affecting specific writers
646
646
647`--ascii`
647`--ascii`
648
648
649−: Use only ASCII characters in output. Currently supported only
649+: Use only ASCII characters in output. Currently supported only for
650− for HTML output (which uses numerical entities instead of
650+ HTML and DocBook output (which uses numerical entities instead of
651 UTF-8 when this option is selected).
651 UTF-8 when this option is selected).
652
652
653`--reference-links`
653`--reference-links`
src/Text/Pandoc/App.hs+4−1
@@ -411,7 +411,10 @@ convertWithOpts opts = do
411 selfcontain = if optSelfContained opts && htmlFormat
411 selfcontain = if optSelfContained opts && htmlFormat
412 then makeSelfContained writerOptions
412 then makeSelfContained writerOptions
413 else return
413 else return
414− handleEntities = if htmlFormat && optAscii opts
414+ handleEntities = if (htmlFormat ||
415+ format == "docbook4" ||
416+ format == "docbook5" ||
417+ format == "docbook") && optAscii opts
415 then toEntities
418 then toEntities
416 else id
419 else id
417 output <- f writerOptions doc'
420 output <- f writerOptions doc'