aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-06 20:45:42 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-06 20:45:42 +0000
commitae30b5ae3758122641b3188098a014210e0b6714 (patch)
tree77d317982e515e6afab42568561cd32ff73db0f8 /Text/Pandoc
parent27b3146bceb5261f90606445cf40af2f5bb3bdb7 (diff)
downloadpandoc-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.hs6
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 '\\'