From ecd5e7da1c84b0165203ca29335f74142b50f073 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 20 Oct 2010 14:55:46 +1100 Subject: Handle % quoting better. From bug #2093767. --- lexers/LexRuby.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lexers/LexRuby.cxx') diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index a77ff13ee..402b8da32 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -978,6 +978,15 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, } else if (preferRE && !isSafeWordcharOrHigh(chNext)) { // Ruby doesn't allow high bit chars here, // but the editor host might + Quote.New(); + state = SCE_RB_STRING_QQ; + Quote.Open(chNext); + advance_char(i, ch, chNext, chNext2); // pass by ref + have_string = true; + } else if (!isSafeWordcharOrHigh(chNext) && !iswhitespace(chNext) && !isEOLChar(chNext)) { + // Ruby doesn't allow high bit chars here, + // but the editor host might + Quote.New(); state = SCE_RB_STRING_QQ; Quote.Open(chNext); advance_char(i, ch, chNext, chNext2); // pass by ref -- cgit v1.2.3