Fix stdin handling for file-scope
Regardless of input type, we should use default handling if we are dealing with stdin. In other words, there should be no file-scope if there are no files. This was an issue with pandoc json, which could be piped on stdin, but which was read by default with `--file-scope`.
This commit is contained in:
parent
08c625cff0
commit
a8a2d4f224
1 changed files with 1 additions and 0 deletions
|
@ -1327,6 +1327,7 @@ convertWithOpts opts args = do
|
|||
(doc, media) <- case reader of
|
||||
(StringReader _) | not fileScope && readerName' /= "json" ->
|
||||
sourceToDoc sources
|
||||
_ | null sources -> sourceToDoc sources
|
||||
_ -> do pairs <- mapM (\s -> sourceToDoc [s]) sources
|
||||
return (mconcat $ map fst pairs, mconcat $ map snd pairs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue