[Konversation-devel] [Bug 98647] do not highlight short channel names like #6 or #x
ismail donmez ( cartman )
ismail at kde.org
Thu Jul 1 15:58:33 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=98647
--- Comment #2 from ismail ( cartman ) donmez <ismail kde org> 2010-07-01 15:58:31 ---
commit 928daff0e138bdc792463bcea526a7b7b425fb13
Author: İsmail Dönmez <ismail at kde.org>
Date: Sat Feb 5 22:44:01 2005 +0000
Omit single character channel names when building channel links
BUG:98647
svn path=/trunk/kdeextragear-2/konversation/; revision=386565
diff --git a/konversation/common.cpp b/konversation/common.cpp
index 80b1d79..08dfb4d 100644
--- a/konversation/common.cpp
+++ b/konversation/common.cpp
@@ -50,17 +50,16 @@ QString tagURLs(const QString& text, const QString&
fromNick)
if(filteredLine.contains("#"))
{
- QRegExp chanExp("(?:^|\\s)#[^\\s\\x0007,]+");
+ QRegExp chanExp("(?:^|\\s)#[^\\s\\x0007,]{2,}");
while((pos = chanExp.search(filteredLine, pos)) >= 0)
{
urlLen = chanExp.matchedLength();
- QString href = filteredLine.mid( pos, urlLen );
- QString link = "#" + href.stripWhiteSpace();
-
- link = "<font color=\"#"+linkColor+"\"><a
href=\""+link+"\">"+href+"</a></font>";
- filteredLine.replace( pos, urlLen, link );
- pos += link.length()-1;
+ QString href = filteredLine.mid( pos, urlLen );
+ QString link = "#" + href.stripWhiteSpace();
+ link = "<font color=\"#"+linkColor+"\"><a
href=\""+link+"\">"+href+"</a></font>";
+ filteredLine.replace( pos, urlLen, link );
+ pos += link.length()-1;
}
}
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list