aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRuby.cxx
diff options
context:
space:
mode:
authorNathan Broadbent <nathan.f77@gmail.com>2011-12-09 19:00:20 +1100
committerNathan Broadbent <nathan.f77@gmail.com>2011-12-09 19:00:20 +1100
commitb1a8b1c12ebc3dd01f4cd2cb7aaf339075d8e6c4 (patch)
tree64576358f4775b59869834a37509cf3c7d85dc8b /lexers/LexRuby.cxx
parentebdb9dba00b6f4f09526630b5dbcd9e59f912588 (diff)
downloadscintilla-mirror-b1a8b1c12ebc3dd01f4cd2cb7aaf339075d8e6c4.tar.gz
Fixed ruby lexer to correctly handle '=begin' comments at start of file. Any '=' at the start of a file would incorrectly trigger the comment state.
--- lexers/LexRuby.cxx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Diffstat (limited to 'lexers/LexRuby.cxx')
-rw-r--r--lexers/LexRuby.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx
index 4545bfa27..d21a3df15 100644
--- a/lexers/LexRuby.cxx
+++ b/lexers/LexRuby.cxx
@@ -788,13 +788,13 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle,
state = SCE_RB_COMMENTLINE;
} else if (ch == '=') {
// =begin indicates the start of a comment (doc) block
- if (i == 0 || (isEOLChar(chPrev)
+ if ((i == 0 || isEOLChar(chPrev))
&& chNext == 'b'
&& styler.SafeGetCharAt(i + 2) == 'e'
&& styler.SafeGetCharAt(i + 3) == 'g'
&& styler.SafeGetCharAt(i + 4) == 'i'
&& styler.SafeGetCharAt(i + 5) == 'n'
- && !isSafeWordcharOrHigh(styler.SafeGetCharAt(i + 6)))) {
+ && !isSafeWordcharOrHigh(styler.SafeGetCharAt(i + 6))) {
styler.ColourTo(i - 1, state);
state = SCE_RB_POD;
} else {