@@ -610,15 +610,19 @@ blockTags :: [String]
610610blockTags = blockHtmlTags ++ blockDocBookTags
611611
612612isInlineTag :: Tag String -> Bool
613−isInlineTag t = tagOpen (`notElem` blockTags) (const True) t ||
614− tagClose (`notElem` blockTags) t ||
613+isInlineTag t = tagOpen isInlineTagName (const True) t ||
614+ tagClose isInlineTagName t ||
615615 tagComment (const True) t
616+ where isInlineTagName x = x `notElem` blockTags
616617
617618isBlockTag :: Tag String -> Bool
618−isBlockTag t = tagOpen (`elem` blocktags) (const True) t ||
619− tagClose (`elem` blocktags) t ||
619+isBlockTag t = tagOpen isBlockTagName (const True) t ||
620+ tagClose isBlockTagName t ||
620621 tagComment (const True) t
621− where blocktags = blockTags ++ eitherBlockOrInline
622+ where isBlockTagName ('?':_) = True
623+ isBlockTagName ('!':_) = True
624+ isBlockTagName x = x `elem` blockTags
625+ || x `elem` eitherBlockOrInline
622626
623627isTextTag :: Tag String -> Bool
624628isTextTag = tagText (const True)