OSDN Git Service

Fix GitHub #610: Syntax Higlighment - Why WinMerge search for keywords/directives...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 7 Feb 2021 22:35:56 +0000 (07:35 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 7 Feb 2021 22:35:56 +0000 (07:35 +0900)
Externals/crystaledit/editlib/parsers/autoit.cpp

index 0a493d5..8a35c0e 100644 (file)
@@ -590,6 +590,17 @@ out:
           break;
         }
 
+      //  String constant '....'
+      if (dwCookie & COOKIE_CHAR)
+        {
+          if (pszChars[I] == '\'')
+            {
+              dwCookie &= ~COOKIE_CHAR;
+              bRedefineBlock = true;
+            }
+          continue;
+        }
+
       //  String constant "...."
       if (dwCookie & COOKIE_STRING)
         {
@@ -639,6 +650,14 @@ out:
           continue;
         }
 
+      //  Normal text
+      if (pszChars[I] == '\'')
+        {
+          DEFINE_BLOCK (I, COLORINDEX_STRING);
+          dwCookie |= COOKIE_CHAR;
+          continue;
+        }
+
       if (bFirstChar)
         {
           if (pszChars[I] == '#')