@@ -131,6 +131,7 @@ block = do
131131 , eSwitch B.para block
132132 , mempty <$ eFootnote
133133 , mempty <$ eTOC
134+ , mempty <$ eTitlePage
134135 , pPara
135136 , pHeader
136137 , pBlockQuote
@@ -334,9 +335,13 @@ headerLevel tagtype = do
334335 <|>
335336 return level
336337
337−
338−
339−
338+eTitlePage :: TagParser ()
339+eTitlePage = try $ do
340+ let isTitlePage as = maybe False (isInfixOf "titlepage") (lookup "type" as)
341+ let groupTag = tagOpen (\x -> x `elem` groupingContent || x == "section")
342+ isTitlePage
343+ TagOpen tag _ <- lookAhead $ pSatisfy groupTag
344+ () <$ pInTags tag block
340345
341346pHeader :: TagParser Blocks
342347pHeader = try $ do
@@ -922,13 +927,14 @@ instance HasLastStrPosition HTMLState where
922927sectioningContent :: [String]
923928sectioningContent = ["article", "aside", "nav", "section"]
924929
925−{-
930+
926931groupingContent :: [String]
927932groupingContent = ["p", "hr", "pre", "blockquote", "ol"
928933 , "ul", "li", "dl", "dt", "dt", "dd"
929934 , "figure", "figcaption", "div", "main"]
930935
931936
937+{-
932938
933939types :: [(String, ([String], Int))]
934940types = -- Document divisions