fall back to old regexps if the freebsd ones don't work
This commit is contained in:
parent
c5401d7d4b
commit
660344a8b7
|
@ -137,11 +137,20 @@ class TerminatorTerm:
|
||||||
self._vte.connect ("enter_notify_event", self.on_vte_notify_enter)
|
self._vte.connect ("enter_notify_event", self.on_vte_notify_enter)
|
||||||
|
|
||||||
self.matches['full_uri'] = self._vte.match_add ('''[[:<:]](news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)//([-A-Za-z0-9]+(:[-A-Za-z0-9,?;.:/!%$^*&~"#']+)?@)?[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?[[:>:]]/?''')
|
self.matches['full_uri'] = self._vte.match_add ('''[[:<:]](news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)//([-A-Za-z0-9]+(:[-A-Za-z0-9,?;.:/!%$^*&~"#']+)?@)?[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?[[:>:]]/?''')
|
||||||
|
if self.matches['full_uri'] == -1:
|
||||||
|
self.matches['full_uri'] = self._vte.match_add ('''\<(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)//([-A-Za-z0-9]+(:[-A-Za-z0-9,?;.:/!%$^*&~"#']+)?@)?[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?\>/?''')
|
||||||
|
|
||||||
self.matches['addr_only'] = self._vte.match_add ('''[[:<:]](www|ftp)[-A-Za-z0-9]*\.[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?[[:>:]]/?''')
|
self.matches['addr_only'] = self._vte.match_add ('''[[:<:]](www|ftp)[-A-Za-z0-9]*\.[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?[[:>:]]/?''')
|
||||||
|
if self.matches['addr_only'] == -1:
|
||||||
|
self.matches['addr_only'] = self._vte.match_add ('''\<(www|ftp)[-A-Za-z0-9]*\.[-A-Za-z0-9.]+(:[0-9]+)?(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\"])?\>/?''')
|
||||||
|
|
||||||
self.matches['email'] = self._vte.match_add ('''[[:<:]](mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+[[:>:]]''')
|
self.matches['email'] = self._vte.match_add ('''[[:<:]](mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+[[:>:]]''')
|
||||||
|
if self.matches['email'] == -1:
|
||||||
|
self.matches['email'] = self._vte.match_add ('''\<(mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+\>''')
|
||||||
|
|
||||||
self.matches['nntp'] = self._vte.match_add ('''[[:<:]]news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?[[:>:]]''')
|
self.matches['nntp'] = self._vte.match_add ('''[[:<:]]news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?[[:>:]]''')
|
||||||
|
if self.matches['nntp'] == -1:
|
||||||
|
self.matches['nntp'] = self._vte.match_add ('''\<news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?\>''')
|
||||||
|
|
||||||
self.spawn_child ()
|
self.spawn_child ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue