@@ -773,11 +773,6 @@ parseBlock (Elem e) =
774 return $ codeBlockWith (attrValue "id" e, classes', [])
774 return $ codeBlockWith (attrValue "id" e, classes', [])
775 $ trimNl $ strContentRecursive e
775 $ trimNl $ strContentRecursive e
776− strContentRecursive = strContent . (\e' -> e'{ elContent =
777− map elementToStr $ elContent e' })
778− elementToStr :: Content -> Content
779− elementToStr (Elem e') = Text $ CData CDataText (strContentRecursive e') Nothing
781 parseBlockquote = do
776 parseBlockquote = do
782 attrib <- case filterChild (named "attribution") e of
777 attrib <- case filterChild (named "attribution") e of
783 Nothing -> return mempty
778 Nothing -> return mempty
@@ -880,6 +875,14 @@ parseBlock (Elem e) =
880getInlines :: Element -> DB Inlines
875getInlines :: Element -> DB Inlines
881getInlines e' = (trimInlines . mconcat) <$> (mapM parseInline $ elContent e')
876getInlines e' = (trimInlines . mconcat) <$> (mapM parseInline $ elContent e')
878+strContentRecursive :: Element -> String
879+strContentRecursive = strContent .
880+ (\e' -> e'{ elContent = map elementToStr $ elContent e' })
882+elementToStr :: Content -> Content
883+elementToStr (Elem e') = Text $ CData CDataText (strContentRecursive e') Nothing
883parseInline :: Content -> DB Inlines
886parseInline :: Content -> DB Inlines
884parseInline (Text (CData _ s _)) = return $ text s
887parseInline (Text (CData _ s _)) = return $ text s
885parseInline (CRef ref) =
888parseInline (CRef ref) =
@@ -964,7 +967,7 @@ parseInline (Elem e) =
964 let classes' = case attrValue "language" e of
967 let classes' = case attrValue "language" e of
967− return $ codeWith (attrValue "id" e,classes',[]) $ strContent e
970+ return $ codeWith (attrValue "id" e,classes',[]) $ strContentRecursive e
968 simpleList = (mconcat . intersperse (str "," <> space)) <$> mapM getInlines
971 simpleList = (mconcat . intersperse (str "," <> space)) <$> mapM getInlines
969 (filterChildren (named "member") e)
972 (filterChildren (named "member") e)
970 segmentedList = do
973 segmentedList = do