aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-05-12 12:24:26 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-05-12 12:24:26 -0700
commit1c26f2c516bc8db1073dbe5f46bb14d512d1c7bb (patch)
tree1f052e8176e74e5d4e0ebeca50e5e82c8506a0b0 /src/Text/Pandoc/Readers
parent9d44dc388733fa47e4b493ded9eb50736dc25a18 (diff)
downloadpandoc-1c26f2c516bc8db1073dbe5f46bb14d512d1c7bb.tar.gz
DocBook reader: Promote level 0 headers to 1 even if dbBook not set.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index 9b4acef12..f2f24b6cc 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -809,7 +809,7 @@ parseBlock (Elem e) =
isEntry x = named "entry" x || named "td" x || named "th" x
parseRow = mapM (parseMixed plain . elContent) . filterChildren isEntry
sect n = do isbook <- gets dbBook
- let n' = if isbook then n + 1 else n
+ let n' = if isbook || n == 0 then n + 1 else n
headerText <- case filterChild (named "title") e of
Just t -> getInlines t
Nothing -> return mempty