@@ -34,7 +34,8 @@ module Text.Pandoc.XML ( stripTags,
3434 selfClosingTag,
3535 inTagsSimple,
3636 inTagsIndented ) where
37−import Text.PrettyPrint.HughesPJ
37+
38+import Text.Pandoc.Pretty
3839
3940-- | Remove everything between <...>
4041stripTags :: String -> String
@@ -61,9 +62,9 @@ escapeStringForXML = concatMap escapeCharForXML
6162
6263-- | Return a text object with a string of formatted XML attributes.
6364attributeList :: [(String, String)] -> Doc
64−attributeList = text . concatMap
65− (\(a, b) -> " " ++ escapeStringForXML a ++ "=\"" ++
66− escapeStringForXML b ++ "\"")
65+attributeList = hcat . map
66+ (\(a, b) -> text (' ' : escapeStringForXML a ++ "=\"" ++
67+ escapeStringForXML b ++ "\""))
6768
6869-- | Put the supplied contents between start and end tags of tagType,
6970-- with specified attributes and (if specified) indentation.