From 9b5d2031c7d643de3397da2e4f38b2f6b45feb64 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Jul 2012 22:04:23 -0700 Subject: Restored stateStandalone as readerStandalone. It is indeed needed by the RST reader. --- src/Text/Pandoc/Readers/RST.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 39da6de6a..11bcb7f0e 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -103,10 +103,13 @@ parseRST = do let reversedNotes = stateNotes st' updateState $ \s -> s { stateNotes = reverse reversedNotes } -- now parse it for real... - blocks <- parseBlocks + blocks <- parseBlocks let blocks' = filter (/= Null) blocks + standalone <- getOption readerStandalone + let (blocks'', title) = if standalone + then titleTransform blocks' + else (blocks', []) state <- getState - let (blocks'', title) = titleTransform blocks' let authors = stateAuthors state let date = stateDate state let title' = if (null title) then (stateTitle state) else title -- cgit v1.2.3