From ee75d5ca5f115275a1bab1952e265dd05b86be76 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 22 Aug 2010 21:25:53 +0000 Subject: [PATCH] Rearranged patterns that are searched for; match longer ones first svn: r15804 --- src/gui/widgets/styledtexteditor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/styledtexteditor.py b/src/gui/widgets/styledtexteditor.py index 89591e95e..c88904e35 100644 --- a/src/gui/widgets/styledtexteditor.py +++ b/src/gui/widgets/styledtexteditor.py @@ -517,14 +517,14 @@ class StyledTextEditor(gtk.TextView): self.textbuffer.create_tag('hyperlink', underline=UNDERLINE_SINGLE, foreground='blue') + self.textbuffer.match_add(SCHEME + "//(" + USER + "@)?[" + + HOSTCHARS + ".]+" + "(:[0-9]+)?(" + + URLPATH + ")?/?", GENURL) self.textbuffer.match_add("(www|ftp)[" + HOSTCHARS + "]*\\.[" + HOSTCHARS + ".]+" + "(:[0-9]+)?(" + URLPATH + ")?/?", HTTP) self.textbuffer.match_add("(mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9]" "[a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)+", MAIL) - self.textbuffer.match_add(SCHEME + "//(" + USER + "@)?[" + - HOSTCHARS + ".]+" + "(:[0-9]+)?(" + - URLPATH + ")?/?", GENURL) def _create_spell_menu(self): """Create a menu with all the installed languages.