From 255037a0912c5cc819985f4224057659f7af50fa Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 19 Sep 2013 10:09:32 -0700 Subject: Markdown reader: small code improvement. --- src/Text/Pandoc/Writers/Markdown.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index a36bb8e14..69ca05216 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -187,11 +187,11 @@ pandocToMarkdown opts (Pandoc meta blocks) = do then tableOfContents opts headerBlocks else empty -- Strip off final 'references' header if markdown citations enabled - let blocks' = case reverse blocks of - (Div (_,["references"],_) _):xs - | not isPlain && isEnabled Ext_citations opts - -> reverse xs - _ -> blocks + let blocks' = if not isPlain && isEnabled Ext_citations opts + then case reverse blocks of + (Div (_,["references"],_) _):xs -> reverse xs + _ -> blocks + else blocks body <- blockListToMarkdown opts blocks' st <- get notes' <- notesToMarkdown opts (reverse $ stNotes st) -- cgit v1.2.3