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.
This commit is contained in:
John MacFarlane
2011-11-22 14:22:22 -08:00
parent 2f3d76844a
commit db1c16e856
+4 -4
View File
@@ -743,7 +743,7 @@ main = do
then "html"
else "markdown"
in defaultReaderName fallback sources
else readerName
else readerName
let writerName' = if null writerName
then defaultWriterName outputFile
@@ -753,8 +753,10 @@ main = do
Just r -> return r
Nothing -> error ("Unknown reader: " ++ readerName')
let standalone' = standalone || isNonTextOutput writerName'
templ <- case templatePath of
_ | not standalone -> return ""
_ | not standalone' -> return ""
Nothing -> do
deftemp <- getDefaultTemplate datadir writerName'
case deftemp of
@@ -774,8 +776,6 @@ main = do
(\_ -> throwIO e)
else throwIO e)
let standalone' = standalone || isNonTextOutput writerName'
variables' <- case mathMethod of
LaTeXMathML Nothing -> do
s <- readDataFile datadir $ "data" </> "LaTeXMathML.js"