Skip to content

Commit

Permalink
Fix GitHub #610: Syntax Higlighment - Why WinMerge search for keyword…
Browse files Browse the repository at this point in the history
…s/directives inside of strings ?
  • Loading branch information
sdottaka committed Feb 7, 2021
1 parent 9b91c0b commit a9b9110
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Externals/crystaledit/editlib/parsers/autoit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,17 @@ CrystalLineParser::ParseLineAutoIt (unsigned dwCookie, const TCHAR *pszChars, in
break;
}

// String constant '....'
if (dwCookie & COOKIE_CHAR)
{
if (pszChars[I] == '\'')
{
dwCookie &= ~COOKIE_CHAR;
bRedefineBlock = true;
}
continue;
}

// String constant "...."
if (dwCookie & COOKIE_STRING)
{
Expand Down Expand Up @@ -639,6 +650,14 @@ CrystalLineParser::ParseLineAutoIt (unsigned dwCookie, const TCHAR *pszChars, in
continue;
}

// Normal text
if (pszChars[I] == '\'')
{
DEFINE_BLOCK (I, COLORINDEX_STRING);
dwCookie |= COOKIE_CHAR;
continue;
}

if (bFirstChar)
{
if (pszChars[I] == '#')
Expand Down

0 comments on commit a9b9110

Please sign in to comment.