mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
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:
+4
-4
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user