From 1dba82f25ee17590bf03b00659662240460b7824 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Jul 2012 20:08:42 -0700 Subject: Got rid of stateStandalone, which was hardly used anyway. The only possible effect will be with rst fragments that begin with an rst title block, which will now cause the header transform. --- src/Text/Pandoc/Parsing.hs | 2 -- src/Text/Pandoc/Readers/RST.hs | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index dd73e01ee..9c553a9ed 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -695,7 +695,6 @@ data ParserState = ParserState stateKeys :: KeyTable, -- ^ List of reference keys stateCitations :: [String], -- ^ List of available citations stateNotes :: NoteTable, -- ^ List of notes - stateStandalone :: Bool, -- ^ Parse bibliographic info? stateTitle :: [Inline], -- ^ Title of document stateAuthors :: [[Inline]], -- ^ Authors of document stateDate :: [Inline], -- ^ Date of document @@ -724,7 +723,6 @@ defaultParserState = stateKeys = M.empty, stateCitations = [], stateNotes = [], - stateStandalone = False, stateTitle = [], stateAuthors = [], stateDate = [], diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index b017b736b..39da6de6a 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -106,9 +106,7 @@ parseRST = do blocks <- parseBlocks let blocks' = filter (/= Null) blocks state <- getState - let (blocks'', title) = if stateStandalone state - then titleTransform blocks' - else (blocks', []) + 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