diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-09-06 20:45:42 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-09-06 20:45:42 +0000 |
commit | ae30b5ae3758122641b3188098a014210e0b6714 (patch) | |
tree | 77d317982e515e6afab42568561cd32ff73db0f8 /Text/Pandoc | |
parent | 27b3146bceb5261f90606445cf40af2f5bb3bdb7 (diff) | |
download | pandoc-ae30b5ae3758122641b3188098a014210e0b6714.tar.gz |
LaTeX reader: Fixed regression in list parsing
(introduced by recent changes to unknownCommand).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1423 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc')
-rw-r--r-- | Text/Pandoc/Readers/LaTeX.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Text/Pandoc/Readers/LaTeX.hs b/Text/Pandoc/Readers/LaTeX.hs index 4cecebda1..7c52650e6 100644 --- a/Text/Pandoc/Readers/LaTeX.hs +++ b/Text/Pandoc/Readers/LaTeX.hs @@ -400,13 +400,13 @@ unknownCommand = try $ do notFollowedBy' $ choice $ map end ["itemize", "enumerate", "description", "document"] state <- getState + if stateParserContext state == ListItemState + then notFollowedBy' $ string "\\item" + else return () if stateParseRaw state then do (name, star, args) <- command spaces - if name == "item" && stateParserContext state == ListItemState - then fail "should not be parsed as raw" - else return "" return $ Plain [TeX ("\\" ++ name ++ star ++ concat args)] else do -- skip unknown command, leaving arguments to be parsed char '\\' |