aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/pandoc.hs b/pandoc.hs
index a4906382a..26558aa61 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -73,6 +73,9 @@ import Text.Pandoc.Readers.Txt2Tags (getT2TMeta)
import Paths_pandoc (getDataDir)
import Text.Printf (printf)
import Text.Pandoc.Error
+#ifdef _WINDOWS
+import System.FilePath.Glob (glob)
+#endif
type Transform = Pandoc -> Pandoc
@@ -1056,7 +1059,13 @@ main = do
-- thread option data structure through all supplied option actions
opts <- foldl (>>=) (return defaultOpts) actions
+
+-- on windows we need to do our own file globbing, since the shell doesn't.
+#ifdef _WINDOWS
+ mapM glob args >>= convertWithOpts opts . concat
+#else
convertWithOpts opts args
+#endif
convertWithOpts :: Opt -> [FilePath] -> IO ()
convertWithOpts opts args = do