@@ -27,7 +27,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28Functions for escaping and formatting XML.
28Functions for escaping and formatting XML.
30+module Text.Pandoc.XML ( stripTags,
30−module Text.Pandoc.XML ( escapeCharForXML,
31+ escapeCharForXML,
31 escapeStringForXML,
32 escapeStringForXML,
33 selfClosingTag,
34 selfClosingTag,
@@ -35,6 +36,16 @@ module Text.Pandoc.XML ( escapeCharForXML,
35 inTagsIndented ) where
36 inTagsIndented ) where
36import Text.PrettyPrint.HughesPJ
37import Text.PrettyPrint.HughesPJ
39+-- | Remove everything between <...>
40+stripTags :: String -> String
42+ let (_,rest) = break (=='>') xs
45+ else stripTags (tail rest) -- leave off >
46+stripTags (x:xs) = x : stripTags xs
38-- | Escape one character as needed for XML.
49-- | Escape one character as needed for XML.
39escapeCharForXML :: Char -> String
50escapeCharForXML :: Char -> String
40escapeCharForXML x = case x of
51escapeCharForXML x = case x of