diff options
-rw-r--r-- | src/Text/Pandoc/App/OutputSettings.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index 343287a4b..837636503 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -165,7 +165,16 @@ optToOutputSettings opts = do "" -> tp <.> format _ -> tp Just . UTF8.toString <$> - ((fst <$> fetchItem tp') `catchError` + ((do surl <- stSourceURL <$> getCommonState + -- we don't want to look for templates remotely + -- unless the full URL is specified: + modifyCommonState $ \st -> st{ + stSourceURL = Nothing } + (bs, _) <- fetchItem tp' + modifyCommonState $ \st -> st{ + stSourceURL = surl } + return bs) + `catchError` (\e -> case e of PandocResourceNotFound _ -> |