[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Dec 14 21:21:35 CET 2004


CVS commit by staikos: 

add parser support for \n and \t - fixes 3/8 broken testcases


  M +18 -1     labelparser.cpp   1.6


--- kdeextragear-2/kst/kst/labelparser.cpp  #1.5:1.6
@@ -104,5 +104,4 @@ inline bool parseOutChar(const QString& 
     EXPAND_GREEK('L', 'l', "ambda", 6)
     EXPAND_GREEK('M', 'm', "u",     2)
-    EXPAND_GREEK('N', 'n', "u",     2)
     EXPAND_GREEK('X', 'x', "i",     2)
     EXPAND_GREEK('R', 'r', "ho",    3)
@@ -125,4 +124,18 @@ inline bool parseOutChar(const QString& 
       break;
 
+    case 'N':
+      upper = true;
+    case 'n':
+      if (txt.mid(from + 1).startsWith("u")) {
+        *skip = 2;
+        setSymbolChar(c, tail);
+        return true;
+      } else {
+        *skip = 1;
+        setNormalChar('\n', tail);
+        return true;
+      }
+      break;
+
     case 'T':
       upper = true;
@@ -137,4 +150,8 @@ inline bool parseOutChar(const QString& 
         setSymbolChar(c, tail);
         return true;
+      } else {
+        *skip = 1;
+        setNormalChar('\t', tail);
+        return true;
       }
       break;





More information about the Kst mailing list