From e6b90e5b551f84aac17106873b6f6303fd2c19b0 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 29 Jul 2014 15:10:20 +0200 Subject: Bug [#1627]. Allow FIDs as Ruby symbol literals --- lexers/LexRuby.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index f818d3d47..0fdbab7d1 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -1260,7 +1260,11 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, } else if (state == SCE_RB_CLASS_VAR || state == SCE_RB_INSTANCE_VAR || state == SCE_RB_SYMBOL) { - if (!isSafeWordcharOrHigh(ch)) { + if (state == SCE_RB_SYMBOL && (ch == '!' || ch == '?') && chNext != '=') { + styler.ColourTo(i, state); + state = SCE_RB_DEFAULT; + preferRE = false; + } else if (!isSafeWordcharOrHigh(ch)) { styler.ColourTo(i - 1, state); redo_char(i, ch, chNext, chNext2, state); // pass by ref preferRE = false; -- cgit v1.2.3