git.iko.soy/typeable/pandoc
on master help sign in
Give source position for include file loop.
62b30d8John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -960,7 +960,7 @@ include = do
960 mconcat <$> forM fs' (\f -> do
960 mconcat <$> forM fs' (\f -> do
961 containers <- stateContainers <$> getState
961 containers <- stateContainers <$> getState
962 when (f `elem` containers) $
962 when (f `elem` containers) $
963− throwError $ PandocParseError $ "Include file loop in " ++ f
963+ throwError $ PandocParseError $ "Include file loop at " ++ show oldPos
964 updateState $ \s -> s{ stateContainers = f : stateContainers s }
964 updateState $ \s -> s{ stateContainers = f : stateContainers s }
965 contents <- lift $ readTeXFile f
965 contents <- lift $ readTeXFile f
966 setPosition $ newPos f 1 1
966 setPosition $ newPos f 1 1