Skip to content

Commit 13948a1

Browse files
committed
Merge branch 'release/2.2.2'
2 parents c109627 + 0a472d0 commit 13948a1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

textile/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ def hasRawText(self, text):
436436
True
437437
438438
"""
439-
r = re.compile(r'<(p|blockquote|div|form|table|ul|ol|dl|pre|h\d)[^>]*?>.*</\1>',
439+
# The php version has orders the below list of tags differently. The
440+
# important thing to note here is that the pre must occur before the
441+
# p or else the regex module doesn't properly match pre-s. It only
442+
# matches the p in pre.
443+
r = re.compile(r'<(pre|p|blockquote|div|form|table|ul|ol|dl|h[1-6])[^>]*?>.*</\1>',
440444
re.S).sub('', text.strip()).strip()
441445
r = re.compile(r'<(hr|br)[^>]*?/>').sub('', r)
442446
return '' != r

textile/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '2.2.1'
1+
VERSION = '2.2.2'

0 commit comments

Comments
 (0)