aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRuby.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexRuby.cxx')
-rw-r--r--lexers/LexRuby.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx
index 2affffe65..6f7c34404 100644
--- a/lexers/LexRuby.cxx
+++ b/lexers/LexRuby.cxx
@@ -562,7 +562,7 @@ static bool sureThisIsNotHeredoc(Sci_Position lt2StartPos,
bool allow_indent;
Sci_Position target_start, target_end;
// From this point on no more styling, since we're looking ahead
- if (styler[j] == '-') {
+ if (styler[j] == '-' || styler[j] == '~') {
allow_indent = true;
j++;
} else {
@@ -888,7 +888,7 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init
chNext = chNext2;
styler.ColourTo(i, SCE_RB_OPERATOR);
- if (!(strchr("\"\'`_-", chNext2) || isSafeAlpha(chNext2))) {
+ if (!(strchr("\"\'`_-~", chNext2) || isSafeAlpha(chNext2))) {
// It's definitely not a here-doc,
// based on Ruby's lexer/parser in the
// heredoc_identifier routine.
@@ -1234,7 +1234,7 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init
if (HereDoc.State == 0) { // '<<' encountered
HereDoc.State = 1;
HereDoc.DelimiterLength = 0;
- if (ch == '-') {
+ if (ch == '-' || ch == '~') {
HereDoc.CanBeIndented = true;
advance_char(i, ch, chNext, chNext2); // pass by ref
} else {