[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesdk/kbabel/kbabel
From:       Stanislav Višňovský <visnovsky () nenya ! ms ! mff ! cuni ! cz
Date:       2005-03-07 9:51:03
Message-ID: 20050307095103.93EA0103CB () office ! kde ! org
[Download RAW message or body]

CVS commit by nanulo: 

Skip tags for spellcheck at the word beginning

BUGS:98600


  M +10 -0     kbhighlighting.cpp   1.15


--- kdesdk/kbabel/kbabel/kbhighlighting.cpp  #1.14:1.15
@@ -206,4 +206,14 @@ void KBabelHighlighter::flushCurrentWord
         currentWord.truncate( currentWord.length() - 1 );
 
+    // try to remove tags (they might not be fully compliant, but
+    // we don't want to check them anyway
+    QRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|(</[-_.:A-Za-z0-9]*[\\s]*>)");
 +    if( tags.search (currentWord) != -1 )
+    {
+        currentPos += tags.matchedLength();
+    }
+    
+    currentWord.replace ( tags, "" );
+
     if (!currentWord.isEmpty()) {
         bool isPlainWord = true;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic