diff options
-rw-r--r-- | lexers/LexRuby.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index e4fd575fe..092f71dd0 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -504,6 +504,16 @@ static bool sureThisIsNotHeredoc(Sci_Position lt2StartPos, } // Skip next batch of white-space firstWordPosn = skipWhitespace(firstWordPosn, lt2StartPos, styler); + // possible symbol for an implicit hash argument + if (firstWordPosn < lt2StartPos && styler.StyleAt(firstWordPosn) == SCE_RB_SYMBOL) { + for (; firstWordPosn <= lt2StartPos; firstWordPosn += 1) { + if (styler.StyleAt(firstWordPosn) != SCE_RB_SYMBOL) { + break; + } + } + // Skip next batch of white-space + firstWordPosn = skipWhitespace(firstWordPosn, lt2StartPos, styler); + } if (firstWordPosn != lt2StartPos) { // Have [[^ws[identifier]ws[*something_else*]ws<< return definitely_not_a_here_doc; |