From f615d7bb989bc06b17ae84b16b54c74c2fe83c19 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 19 Oct 2017 15:36:18 -0700
Subject: LaTeX reader: Strip off quotes in `\include` filenames.

---
 src/Text/Pandoc/Readers/LaTeX.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/Text')

diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 37becf59f..54c19b622 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1751,7 +1751,8 @@ include = do
                     controlSeq "include" <|> controlSeq "input" <|>
                     controlSeq "subfile" <|> controlSeq "usepackage"
   skipMany $ bracketed inline -- skip options
-  fs <- (map trim . splitBy (==',') . T.unpack . untokenize) <$> braced
+  fs <- (map (T.unpack . removeDoubleQuotes . T.strip) . T.splitOn "," .
+         untokenize) <$> braced
   let fs' = if name == "usepackage"
                then map (maybeAddExtension ".sty") fs
                else map (maybeAddExtension ".tex") fs
-- 
cgit v1.2.3