Merge pull request #886 from mattrose/fix-syntaxwarning
fix syntax warnings
This commit is contained in:
commit
51e3bd2519
@ -321,7 +321,7 @@ class Terminal(Gtk.VBox):
|
|||||||
"""Update the regexps used to match URLs"""
|
"""Update the regexps used to match URLs"""
|
||||||
userchars = "-A-Za-z0-9"
|
userchars = "-A-Za-z0-9"
|
||||||
passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
|
passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
|
||||||
hostchars = "-A-Za-z0-9:\[\]"
|
hostchars = r"-A-Za-z0-9:\[\]"
|
||||||
pathchars = "-A-Za-z0-9_$.+!*(),;:@&=?/~#%'"
|
pathchars = "-A-Za-z0-9_$.+!*(),;:@&=?/~#%'"
|
||||||
schemes = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:|ssh:)"
|
schemes = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:|ssh:)"
|
||||||
user = "[" + userchars + "]+(:[" + passchars + "]+)?"
|
user = "[" + userchars + "]+(:[" + passchars + "]+)?"
|
||||||
@ -345,18 +345,18 @@ class Terminal(Gtk.VBox):
|
|||||||
self._add_regex('voip', re)
|
self._add_regex('voip', re)
|
||||||
|
|
||||||
re = (lboundry +
|
re = (lboundry +
|
||||||
"(www|ftp)[" + hostchars + "]*\.[" + hostchars +
|
"(www|ftp)[" + hostchars + r"]*\.[" + hostchars +
|
||||||
".]+(:[0-9]+)?(" + urlpath + ")?" + rboundry + "/?")
|
".]+(:[0-9]+)?(" + urlpath + ")?" + rboundry + "/?")
|
||||||
self._add_regex('addr_only', re)
|
self._add_regex('addr_only', re)
|
||||||
|
|
||||||
re = (lboundry +
|
re = (lboundry +
|
||||||
"(mailto:)?[a-zA-Z0-9][a-zA-Z0-9.+-]*@[a-zA-Z0-9]" +
|
"(mailto:)?[a-zA-Z0-9][a-zA-Z0-9.+-]*@[a-zA-Z0-9]" +
|
||||||
"[a-zA-Z0-9-]*\.[a-zA-Z0-9][a-zA-Z0-9-]+" +
|
r"[a-zA-Z0-9-]*\.[a-zA-Z0-9][a-zA-Z0-9-]+" +
|
||||||
"[.a-zA-Z0-9-]*" + rboundry)
|
"[.a-zA-Z0-9-]*" + rboundry)
|
||||||
self._add_regex('email', re)
|
self._add_regex('email', re)
|
||||||
|
|
||||||
re = (lboundry +
|
re = (lboundry +
|
||||||
"""news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@""" +
|
r"""news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@""" +
|
||||||
"[-A-Za-z0-9.]+(:[0-9]+)?" + rboundry)
|
"[-A-Za-z0-9.]+(:[0-9]+)?" + rboundry)
|
||||||
self._add_regex('nntp', re)
|
self._add_regex('nntp', re)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user