diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Tests/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | src/Tests/Readers/RST.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 4 | ||||
-rw-r--r-- | src/pandoc.hs | 1 |
5 files changed, 3 insertions, 8 deletions
diff --git a/src/Tests/Readers/Markdown.hs b/src/Tests/Readers/Markdown.hs index 8462558a9..e6612f475 100644 --- a/src/Tests/Readers/Markdown.hs +++ b/src/Tests/Readers/Markdown.hs @@ -10,7 +10,7 @@ import Text.Pandoc.Builder import Text.Pandoc markdown :: String -> Pandoc -markdown = readMarkdown defaultParserState{ stateStandalone = True } +markdown = readMarkdown defaultParserState markdownSmart :: String -> Pandoc markdownSmart = readMarkdown defaultParserState{ stateOptions = diff --git a/src/Tests/Readers/RST.hs b/src/Tests/Readers/RST.hs index 3269092a6..5601731a0 100644 --- a/src/Tests/Readers/RST.hs +++ b/src/Tests/Readers/RST.hs @@ -9,7 +9,7 @@ import Text.Pandoc.Builder import Text.Pandoc rst :: String -> Pandoc -rst = readRST defaultParserState{ stateStandalone = True } +rst = readRST defaultParserState infix 4 =: (=:) :: ToString c 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 diff --git a/src/pandoc.hs b/src/pandoc.hs index 8fb9e293b..ba8c19dad 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -938,7 +938,6 @@ main = do let startParserState = def{ stateLiterateHaskell = "+lhs" `isSuffixOf` readerName' || lhsExtension sources, - stateStandalone = standalone', stateCitations = map CSL.refId refs, stateOptions = def{ readerStrict = strict |