aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-07-25 20:08:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-07-25 20:08:42 -0700
commit1dba82f25ee17590bf03b00659662240460b7824 (patch)
treebe3651aa25289a5b5263a6e3de951deed8314ea2 /src/Text/Pandoc
parent95570ba34c4e7675295b6eefcfcc4dac4ac720af (diff)
downloadpandoc-1dba82f25ee17590bf03b00659662240460b7824.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Parsing.hs2
-rw-r--r--src/Text/Pandoc/Readers/RST.hs4
2 files changed, 1 insertions, 5 deletions
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