diff --git a/scintilla/lexers/LexRuby.cxx b/scintilla/lexers/LexRuby.cxx index 0c8c59679e..768e6e4543 100644 --- a/scintilla/lexers/LexRuby.cxx +++ b/scintilla/lexers/LexRuby.cxx @@ -375,6 +375,7 @@ bool sureThisIsHeredoc(Sci_Position iPrev, LexAccessor &styler, char *prevWord) switch (prevStyle) { case SCE_RB_WORD: case SCE_RB_WORD_DEMOTED: + //case SCE_RB_IDENTIFIER: break; default: return true; @@ -472,11 +473,9 @@ bool sureThisIsNotHeredoc(Sci_Position lt2StartPos, LexAccessor &styler) { } int prevStyle = styler.StyleAt(firstWordPosn); // If we have '<<' following a keyword, it's not a heredoc - if (prevStyle != SCE_RB_IDENTIFIER + if (!IsIdentifierStyle(prevStyle) && prevStyle != SCE_RB_GLOBAL // $stdout and $stderr - && prevStyle != SCE_RB_BUILTIN_FUNCTION - && prevStyle != SCE_RB_LIKE_MODULE // module::method - && prevStyle != SCE_RB_LIKE_CLASS // class::method + //&& prevStyle != SCE_RB_SYMBOL && prevStyle != SCE_RB_INSTANCE_VAR && prevStyle != SCE_RB_CLASS_VAR) { return definitely_not_a_here_doc;