aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 3120afaec..f5d8527dd 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1449,9 +1449,11 @@ include name = do
fs <- (map (T.unpack . removeDoubleQuotes . T.strip) . T.splitOn "," .
untokenize) <$> braced
let addExt f = case takeExtension f of
- "" | name == "usepackage" -> addExtension f ".sty"
- | otherwise -> addExtension f ".tex"
- _ -> f
+ ".tex" -> f
+ ".sty" -> f
+ -- note, we can have cc_by_4.0 for example...
+ _ | name == "usepackage" -> addExtension f ".sty"
+ | otherwise -> addExtension f ".tex"
dirs <- (splitBy (==':') . fromMaybe ".") <$> lookupEnv "TEXINPUTS"
mapM_ (insertIncluded dirs) (map addExt fs)
return mempty