diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | lexers/LexRuby.cxx | 5 | 
2 files changed, 9 insertions, 0 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 5071541a1..06ac8f9fc 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -519,6 +519,10 @@  	extends nested comments to unlimited levels.  	</li>  	<li> +	Ruby lexer treats alternate hash key syntax 'key:' as a symbol. +	<a href="http://sourceforge.net/p/scintilla/bugs/1810/">Bug #1810</a>. +	</li> +	<li>  	For GTK+ on Windows fix 64-bit build which was broken in 3.6.3.  	</li>  	<li> diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index be60f8041..e4fd575fe 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -466,6 +466,7 @@ static bool sureThisIsNotHeredoc(Sci_Position lt2StartPos,      prevStyle = styler.StyleAt(firstWordPosn);      // If we have '<<' following a keyword, it's not a heredoc      if (prevStyle != SCE_RB_IDENTIFIER +            && prevStyle != SCE_RB_SYMBOL              && prevStyle != SCE_RB_INSTANCE_VAR              && prevStyle != SCE_RB_CLASS_VAR) {          return definitely_not_a_here_doc; @@ -1088,6 +1089,10 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init                      // <name>= is a name only when being def'd -- Get it the next time                      // This means that <name>=<name> is always lexed as                      // <name>, (op, =), <name> +                } else if (ch == ':' +                           && isSafeWordcharOrHigh(chPrev) +                           && strchr(" \t\n\r", chNext) != NULL) { +                    state = SCE_RB_SYMBOL;                  } else if ((ch == '?' || ch == '!')                             && isSafeWordcharOrHigh(chPrev)                             && !isSafeWordcharOrHigh(chNext)) { | 
