Don't use `missingIncludes` unless custom syntax defs have been given.
This avoids a huge performance sink that comes from evaluating
all the elements of the default syntax map.
Better just to have run-time errors for missing includes?
See #4226.
commit3a22907306992f2dd1b6bcb548633734c0c9a1b1
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 6 Jan 2018, 00:03 (9 years ago)
parent0d935bd
src/Text/Pandoc/App.hs+2−1
@@ -268,7 +268,8 @@ convertWithOpts opts = do
268268 syntaxMap <- foldM addSyntaxMap defaultSyntaxMap
269269 (optSyntaxDefinitions opts)
270270
271− case missingIncludes (M.elems syntaxMap) of
271+ unless (null (optSyntaxDefinitions opts)) $
272+ case missingIncludes (M.elems syntaxMap) of
272273 [] -> return ()
273274 xs -> E.throwIO $ PandocSyntaxMapError $
274275 "Missing syntax definitions:\n" ++