mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix more python 3.6 regex DeprecationWarning's
This commit is contained in:
parent
cfcf40f1f8
commit
623eb0a4c0
5 changed files with 26 additions and 26 deletions
|
|
@ -88,7 +88,7 @@ def decode_wp_content(content, br=True):
|
|||
content = re.sub(r'<p><blockquote([^>]*)>', "<blockquote\\1><p>", content)
|
||||
content = content.replace('</blockquote></p>', '</p></blockquote>')
|
||||
content = re.sub(r'<p>\s*(</?' + allblocks + '[^>]*>)', "\\1", content)
|
||||
content = re.sub(r'(</?' + allblocks + '[^>]*>)\s*</p>', "\\1", content)
|
||||
content = re.sub(r'(</?' + allblocks + r'[^>]*>)\s*</p>', "\\1", content)
|
||||
if br:
|
||||
def _preserve_newline(match):
|
||||
return match.group(0).replace("\n", "<WPPreserveNewline />")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue