From 2d5c090d405c0f0941a1c713135443454fa47122 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 4 Aug 2010 09:25:43 +1000 Subject: Bug #3038381 Escape of EOL in JS string does not work Patch from Stephan Deibel. --- lexers/LexHTML.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 0d54e7a3e..e025c2b38 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -1628,7 +1628,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty i += 2; } else if (isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_STRINGEOL; + if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) { + state = SCE_HJ_STRINGEOL; + } } break; case SCE_HJ_STRINGEOL: -- cgit v1.2.3