From 994d11eb8062b8836e44a6b74ae32a327ef2509d Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 13 Jul 2008 01:27:08 +0100 Subject: [PATCH] let's apply the boundary test the right way around, and also learn to spell --- terminatorlib/terminatorterm.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 411e226a..97d651e1 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -327,17 +327,17 @@ text/plain user = "[" + userchars + "]+(:[" + passchars + "]+)?" urlpath = "/[" + pathchars + "]*[^]'.}>) \t\r\n,\\\"]" - if platform.system() == 'FreeBSD': + if platform.system() != 'FreeBSD': lboundary = "\\<" rboundary = "\\>" else: - lboundry = "[[:<:]]" - rboundry = "[[:>:]]" + lboundary = "[[:<:]]" + rboundary = "[[:>:]]" - self.matches['full_uri'] = self._vte.match_add(lboundry + schemes + "//(" + user + "@)?[" + hostchars +".]+(:[0-9]+)?(" + urlpath + ")?" + rboundry + "/?") - self.matches['addr_only'] = self._vte.match_add (lboundry + "(www|ftp)[" + hostchars + "]*\.[" + hostchars + ".]+(:[0-9]+)?(" + urlpath + ")?" + rboundry + "/?") - self.matches['email'] = self._vte.match_add (lboundry + "(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-]+[.a-zA-Z0-9-]*" + rboundry) - self.matches['nntp'] = self._vte.match_add (lboundry + '''news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?''' + rboundry) + self.matches['full_uri'] = self._vte.match_add(lboundary + schemes + "//(" + user + "@)?[" + hostchars +".]+(:[0-9]+)?(" + urlpath + ")?" + rboundary + "/?") + self.matches['addr_only'] = self._vte.match_add (lboundary + "(www|ftp)[" + hostchars + "]*\.[" + hostchars + ".]+(:[0-9]+)?(" + urlpath + ")?" + rboundary + "/?") + self.matches['email'] = self._vte.match_add (lboundary + "(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-]+[.a-zA-Z0-9-]*" + rboundary) + self.matches['nntp'] = self._vte.match_add (lboundary + '''news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?''' + rboundary) def spawn_child (self, event=None): update_records = self.conf.update_records