git.iko.soy/typeable/pandoc
on master help sign in
Minor refactoring to readDocBook
3564cd8Frerich Raabe
src/Text/Pandoc/Readers/DocBook.hs+2−2
@@ -524,8 +524,8 @@ instance Default DBState where
524
524
525readDocBook :: ReaderOptions -> String -> Either PandocError Pandoc
525readDocBook :: ReaderOptions -> String -> Either PandocError Pandoc
526readDocBook _ inp = (\blocks -> Pandoc (dbMeta st') (toList . mconcat $ blocks)) <$> bs
526readDocBook _ inp = (\blocks -> Pandoc (dbMeta st') (toList . mconcat $ blocks)) <$> bs
527− where (bs , st') = flip runState def . runExceptT . mapM parseBlock . normalizeTree . parseXML $ inp'
527+ where (bs , st') = flip runState def . runExceptT . mapM parseBlock $ tree
528− inp' = handleInstructions inp
528+ tree = normalizeTree . parseXML . handleInstructions $ inp
529
529
530-- We treat <?asciidoc-br?> specially (issue #1236), converting it
530-- We treat <?asciidoc-br?> specially (issue #1236), converting it
531-- to <br/>, since xml-light doesn't parse the instruction correctly.
531-- to <br/>, since xml-light doesn't parse the instruction correctly.