From 07bce91f4f1614967dd6f3698238d51f5290aae7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 12 Jun 2018 10:30:16 -0700 Subject: [PATCH] Allow --template to take a URL argument. --- MANUAL.txt | 6 +++--- src/Text/Pandoc/App.hs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 97b9972b2..03da6b0bf 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -645,10 +645,10 @@ General writer options output. For `native` output, this option causes metadata to be included; otherwise, metadata is suppressed. -`--template=`*FILE* +`--template=`*FILE*|*URL* -: Use *FILE* as a custom template for the generated document. Implies - `--standalone`. See [Templates], below, for a description +: Use the specified file as a custom template for the generated document. + Implies `--standalone`. See [Templates], below, for a description of template syntax. If no extension is specified, an extension corresponding to the writer will be added, so that `--template=special` looks for `special.html` for HTML output. If the template is not diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index ac6afa5f1..093f0fcfc 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -381,7 +381,7 @@ convertWithOpts opts = do "" -> tp <.> format _ -> tp Just . UTF8.toString <$> - (readFileStrict tp' `catchError` + ((fst <$> fetchItem tp') `catchError` (\e -> case e of PandocIOError _ e' |