git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Strip off quotes in `\include` filenames.
commitf615d7bb989bc06b17ae84b16b54c74c2fe83c19 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 19 Oct 2017, 15:36 (9 years ago) parent28bb5d6
1 file changed+2−1
src/Text/Pandoc/Readers/LaTeX.hs+2−1
src/Text/Pandoc/Readers/LaTeX.hs+2−1
@@ -1751,7 +1751,8 @@ include = do
17511751 controlSeq "include" <|> controlSeq "input" <|>
17521752 controlSeq "subfile" <|> controlSeq "usepackage"
17531753 skipMany $ bracketed inline -- skip options
1754− fs <- (map trim . splitBy (==',') . T.unpack . untokenize) <$> braced
1754+ fs <- (map (T.unpack . removeDoubleQuotes . T.strip) . T.splitOn "," .
1755+ untokenize) <$> braced
17551756 let fs' = if name == "usepackage"
17561757 then map (maybeAddExtension ".sty") fs
17571758 else map (maybeAddExtension ".tex") fs