From 9f548b3f527a48f06f9dfdc1fe9452126488384e Mon Sep 17 00:00:00 2001 From: Jim Pattee Date: Wed, 5 Apr 2017 16:37:02 +1000 Subject: Bug [#1929]. Recognize escaped quotes within quotes. --- lexers/LexPowerShell.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lexers/LexPowerShell.cxx') diff --git a/lexers/LexPowerShell.cxx b/lexers/LexPowerShell.cxx index bf1ee29d1..261575544 100644 --- a/lexers/LexPowerShell.cxx +++ b/lexers/LexPowerShell.cxx @@ -77,11 +77,15 @@ static void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length, // This is a doubles quotes string if (sc.ch == '\"') { sc.ForwardSetState(SCE_POWERSHELL_DEFAULT); + } else if (sc.ch == '`') { + sc.Forward(); // skip next escaped character } } else if (sc.state == SCE_POWERSHELL_CHARACTER) { // This is a single quote string if (sc.ch == '\'') { sc.ForwardSetState(SCE_POWERSHELL_DEFAULT); + } else if (sc.ch == '`') { + sc.Forward(); // skip next escaped character } } else if (sc.state == SCE_POWERSHELL_HERE_STRING) { // This is a doubles quotes here-string -- cgit v1.2.3