git.iko.soy/typeable/pandoc
on master help sign in
Allow some command line options to take URL in addition to FILE.

`--include-in-header`, `--include-before-body`, `--include-after-body`

commitb08c8627d30fdaf991fdff1fd7f3d674b356a976 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 24 Jan 2019, 16:21 (8 years ago) parent22b09d8
2 files changed+5−5
MANUAL.txt+3−3 src/Text/Pandoc/App/OutputSettings.hs+2−2
MANUAL.txt+3−3
@@ -798,7 +798,7 @@ General writer options {.options}
798798 new languages or to use altered syntax definitions for
799799 existing languages.
800800
801−`-H` *FILE*, `--include-in-header=`*FILE*
801+`-H` *FILE*, `--include-in-header=`*FILE*|*URL*
802802
803803: Include contents of *FILE*, verbatim, at the end of the header.
804804 This can be used, for example, to include special
@@ -806,7 +806,7 @@ General writer options {.options}
806806 repeatedly to include multiple files in the header. They will be
807807 included in the order specified. Implies `--standalone`.
808808
809−`-B` *FILE*, `--include-before-body=`*FILE*
809+`-B` *FILE*, `--include-before-body=`*FILE*|*URL*
810810
811811: Include contents of *FILE*, verbatim, at the beginning of the
812812 document body (e.g. after the `<body>` tag in HTML, or the
@@ -815,7 +815,7 @@ General writer options {.options}
815815 used repeatedly to include multiple files. They will be included in
816816 the order specified. Implies `--standalone`.
817817
818−`-A` *FILE*, `--include-after-body=`*FILE*
818+`-A` *FILE*, `--include-after-body=`*FILE*|*URL*
819819
820820: Include contents of *FILE*, verbatim, at the end of the document
821821 body (before the `</body>` tag in HTML, or the
src/Text/Pandoc/App/OutputSettings.hs+2−2
@@ -128,8 +128,8 @@ optToOutputSettings opts = do
128128 withList f (x:xs) vars = f x vars >>= withList f xs
129129
130130 let addContentsAsVariable varname fp vars = do
131− s <- UTF8.toString <$> readFileStrict fp
132− return $ (varname, s) : vars
131+ s <- UTF8.toString . fst <$> fetchItem fp
132+ return $ (varname, s) : vars
133133
134134 variables <-
135135 withList (addStringAsVariable "sourcefile")