git.iko.soy/typeable/pandoc
on master help sign in
Set `--standalone` implicitly when non-text output format.

(ODT, EPUB). This restores pandoc's previous behavior. You can again do `pandoc test.txt -o test.odt` and get a standalone ODT file. Resolves #351.

commitdb1c16e8562a7611e0defbacc353a77fbf1727d2 authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 22 Nov 2011, 14:21 (15 years ago) parent2f3d768
1 file changed+4−4
src/pandoc.hs+4−4
src/pandoc.hs+4−4
@@ -743,7 +743,7 @@ main = do
743743 then "html"
744744 else "markdown"
745745 in defaultReaderName fallback sources
746− else readerName
746+ else readerName
747747
748748 let writerName' = if null writerName
749749 then defaultWriterName outputFile
@@ -753,8 +753,10 @@ main = do
753753 Just r -> return r
754754 Nothing -> error ("Unknown reader: " ++ readerName')
755755
756+ let standalone' = standalone || isNonTextOutput writerName'
757+
756758 templ <- case templatePath of
757− _ | not standalone -> return ""
759+ _ | not standalone' -> return ""
758760 Nothing -> do
759761 deftemp <- getDefaultTemplate datadir writerName'
760762 case deftemp of
@@ -774,8 +776,6 @@ main = do
774776 (\_ -> throwIO e)
775777 else throwIO e)
776778
777− let standalone' = standalone || isNonTextOutput writerName'
778−
779779 variables' <- case mathMethod of
780780 LaTeXMathML Nothing -> do
781781 s <- readDataFile datadir $ "data" </> "LaTeXMathML.js"