From a1f69b1c7d6622a3bee678eb01ba36e94b99cd20 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 14 Nov 2019 05:46:56 -0800 Subject: Fix regression preventing header-includes from being set using -V. See #5904. --- src/Text/Pandoc/App/OutputSettings.hs | 3 ++- test/command/5904.md | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/command/5904.md diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index d328a9b6a..77248cab1 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -117,7 +117,8 @@ optToOutputSettings opts = do let setVariableM k v = return . setVariable k v - let setListVariableM k vs = + let setListVariableM _ [] = return + setListVariableM k vs = return . Context . (M.insert (T.pack k) (toVal $ map T.pack vs)) . unContext diff --git a/test/command/5904.md b/test/command/5904.md new file mode 100644 index 000000000..fdc29407d --- /dev/null +++ b/test/command/5904.md @@ -0,0 +1,8 @@ +``` +% pandoc -s -t markdown -H test/B.txt --variable header-includes:foo +Hi +^D +foo + +Hi +``` -- cgit v1.2.3