summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorFrerich Raabe <raabe@froglogic.com>2015-09-23 19:25:58 +0200
committerFrerich Raabe <raabe@froglogic.com>2015-09-23 19:25:58 +0200
commit3564cd82caf81763f83897bdd144c833ffab58ee (patch)
tree91314bcf182545e715ca99bb1c6dc315f583cb53 /src/Text/Pandoc/Readers
parentf232a0a720ea4879fe2e6f1b9e1a5c4e20097341 (diff)
Minor refactoring to readDocBook
I plan to use the parsed and normalized XML tree read in readDocBook in other places - prepare that commit by factoring this code out into a separate, shared, definition.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index 352b94496..a2aa62249 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -524,8 +524,8 @@ instance Default DBState where
readDocBook :: ReaderOptions -> String -> Either PandocError Pandoc
readDocBook _ inp = (\blocks -> Pandoc (dbMeta st') (toList . mconcat $ blocks)) <$> bs
- where (bs , st') = flip runState def . runExceptT . mapM parseBlock . normalizeTree . parseXML $ inp'
- inp' = handleInstructions inp
+ where (bs , st') = flip runState def . runExceptT . mapM parseBlock $ tree
+ tree = normalizeTree . parseXML . handleInstructions $ inp
-- We treat <?asciidoc-br?> specially (issue #1236), converting it
-- to <br/>, since xml-light doesn't parse the instruction correctly.