From 48b8267126fc82aadf289762718b8c01e5331e4c Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 21 Dec 2006 09:02:06 +0000 Subject: Fixed a serious bug in the Markdown reader (also affecting LaTeX and RST readers). The problem: these readers ran 'runParser' on processed chunks of text to handle embedded block lists in lists and quotation blocks. But then any changes made to the parser state in these chunks was lost, as the state is local to the parser. So, for example, footnotes didn't work in quotes or list items. The fix: instead of calling runParser on some raw text, use setInput to make it the input, then parse it, then use setInput to restore the input to what it was before. This is shorter and more elegant, and it fixes the problem. 'BlockQuoteContext' was also eliminated from ParserContext, as it isn't used anywhere. git-svn-id: https://pandoc.googlecode.com/svn/trunk@261 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Shared.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Shared.hs') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index c933742bd..8418ecffd 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -95,8 +95,7 @@ data HeaderType deriving (Eq, Show) data ParserContext - = BlockQuoteState -- ^ Used when running parser on contents of blockquote - | ListItemState -- ^ Used when running parser on list item contents + = ListItemState -- ^ Used when running parser on list item contents | NullState -- ^ Default state deriving (Eq, Show) -- cgit v1.2.3