From 64d3da63ae87c0f2fb4e7a723bdfbc091bdeb7b4 Mon Sep 17 00:00:00 2001
From: Adrian Holovaty (?:%s).*?[a-zA-Z].*? (?: |\s| (?:%s).*?[a-zA-Z].*? (?: |\s|
|<\/i>|<\/b>|<\/em>|<\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
-HARD_CODED_BULLETS = re.compile(r'((?:
)*?
|<\/i>|<\/b>|<\/em>|<\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
+hard_coded_bullets_re = re.compile(r'((?:
)*?
.
- text = HTML_GUNK.sub('', text)
+ text = html_gunk_re.sub('', text)
# Convert hard-coded bullets into HTML unordered lists.
def replace_p_tags(match):
s = match.group().replace('
%s' % d, '
", but only if it's at the bottom of the text. - text = TRAILING_EMPTY_CONTENT.sub('', text) + text = trailing_empty_content_re.sub('', text) return text