diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-04-07 22:15:20 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-04-07 22:15:20 -0700 |
commit | 250fbef94d67885d39fadce9a01be3bd7a4d50e7 (patch) | |
tree | 0094bb50451d793a6db14dec109c2b655886c440 /src | |
parent | 28497d484e85fd495e92f06416f978763f333518 (diff) | |
download | pandoc-250fbef94d67885d39fadce9a01be3bd7a4d50e7.tar.gz |
DocBook reader: look inside "info" elements for section titles.
Closes #1931.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index f82158ab4..bb104a65a 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -11,6 +11,7 @@ import Data.Generics import Data.Monoid import Data.Char (isSpace) import Control.Monad.State +import Control.Monad import Control.Applicative ((<$>)) import Data.List (intersperse) import Data.Maybe (fromMaybe) @@ -868,7 +869,9 @@ parseBlock (Elem e) = parseRow = mapM (parseMixed plain . elContent) . filterChildren isEntry sect n = do isbook <- gets dbBook let n' = if isbook || n == 0 then n + 1 else n - headerText <- case filterChild (named "title") e of + headerText <- case filterChild (named "title") e `mplus` + (filterChild (named "info") e >>= + filterChild (named "title")) of Just t -> getInlines t Nothing -> return mempty modify $ \st -> st{ dbSectionLevel = n } |