Commit 6fe0fadc authored by Dan Pascu's avatar Dan Pascu

Use log flag names for regular expressions

parent 0087740d
...@@ -2555,14 +2555,14 @@ class HtmlProcessor(object): ...@@ -2555,14 +2555,14 @@ class HtmlProcessor(object):
(?:/(?:[\w/%!$@#*&='~:;,.+-]*(?:\([\w/%!$@#*&='~:;,.+-]*\))?)*)? # [ / path] (?:/(?:[\w/%!$@#*&='~:;,.+-]*(?:\([\w/%!$@#*&='~:;,.+-]*\))?)*)? # [ / path]
(?:\?(?:[\w/%!$@#*&='~:;,.+-]*(?:\([\w/%!$@#*&='~:;,.+-]*\))?)*)? # [ ? query] (?:\?(?:[\w/%!$@#*&='~:;,.+-]*(?:\([\w/%!$@#*&='~:;,.+-]*\))?)*)? # [ ? query]
) )
""", re.I|re.U|re.X), """, re.IGNORECASE | re.UNICODE | re.VERBOSE),
re.compile(r""" re.compile(r"""
(?P<body> (?P<body>
ftps?://(?:[^:@/]+(?::[^@]*)?@)?(?P<host>[a-z0-9.-]+)(?::\d*)? # scheme :// [ user [ : password ] @ ] host [ : port ] ftps?://(?:[^:@/]+(?::[^@]*)?@)?(?P<host>[a-z0-9.-]+)(?::\d*)? # scheme :// [ user [ : password ] @ ] host [ : port ]
(?:/(?:[\w/%!?$@*&='~:,.+-]*(?:\([\w/%!?$@*&='~:,.+-]*\))?)*(?:;type=[aid])?)? # [ / path [ ;type=a/i/d ] ] (?:/(?:[\w/%!?$@*&='~:,.+-]*(?:\([\w/%!?$@*&='~:,.+-]*\))?)*(?:;type=[aid])?)? # [ / path [ ;type=a/i/d ] ]
) )
""", re.I|re.U|re.X), """, re.IGNORECASE | re.UNICODE | re.VERBOSE),
re.compile(r'mailto:(?P<body>[\w.-]+@(?P<host>[a-z0-9.-]+))', re.I|re.U)] re.compile(r'mailto:(?P<body>[\w.-]+@(?P<host>[a-z0-9.-]+))', re.IGNORECASE | re.UNICODE)]
@classmethod @classmethod
def autolink(cls, content): def autolink(cls, content):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment