diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-03-21 16:56:42 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-03-21 17:02:07 -0400 |
commit | a8a2d4f2241118152f245d5dc67a6452606cad71 (patch) | |
tree | d708f5c9895eb1d180bb9b07e2f5a7e71e342436 /pandoc.hs | |
parent | 08c625cff070971feb5f4ee7a3972aca6b27cd4b (diff) |
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`.
Diffstat (limited to 'pandoc.hs')
-rw-r--r-- | pandoc.hs | 1 |
1 files changed, 1 insertions, 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) |