# A set of filters to format HTML to text with barebones Markdown-style markup.
import re
class HtmlToFText:
strip_tags1 = {
# Remove comments first, which may wrap around other tags
"",
# Remove classes, ids and extraneous attributes
" class=\"": "\"", " id=\"": "\"",
}
strip_tags2 = {
# Remove doctype, tags and inner html
"",
"