diff options
author | Jon Reid | 2012-07-17 16:03:14 -0700 |
---|---|---|
committer | Jon Reid | 2012-07-17 16:03:14 -0700 |
commit | 42a51e0c27f2e2cd825d07b3af5ec05b0e5208b3 (patch) | |
tree | 67deeb8c5b34aacc91f737cc64a3bc9ef1f4f05f /imports/codemirror/mode/ruby/ruby.js | |
parent | a12cabc16273ffe04af4bce1f7438dc9326efa89 (diff) | |
parent | b4b3e45d6684e77d361b4f8ca5be4889428320c5 (diff) | |
download | ninja-42a51e0c27f2e2cd825d07b3af5ec05b0e5208b3.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'imports/codemirror/mode/ruby/ruby.js')
-rw-r--r-- | imports/codemirror/mode/ruby/ruby.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/imports/codemirror/mode/ruby/ruby.js b/imports/codemirror/mode/ruby/ruby.js index b647efd0..74ed7b96 100644 --- a/imports/codemirror/mode/ruby/ruby.js +++ b/imports/codemirror/mode/ruby/ruby.js | |||
@@ -30,7 +30,7 @@ CodeMirror.defineMode("ruby", function(config, parserConfig) { | |||
30 | return "comment"; | 30 | return "comment"; |
31 | } | 31 | } |
32 | if (stream.eatSpace()) return null; | 32 | if (stream.eatSpace()) return null; |
33 | var ch = stream.next(); | 33 | var ch = stream.next(), m; |
34 | if (ch == "`" || ch == "'" || ch == '"' || | 34 | if (ch == "`" || ch == "'" || ch == '"' || |
35 | (ch == "/" && !stream.eol() && stream.peek() != " ")) { | 35 | (ch == "/" && !stream.eol() && stream.peek() != " ")) { |
36 | return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state); | 36 | return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state); |
@@ -46,13 +46,8 @@ CodeMirror.defineMode("ruby", function(config, parserConfig) { | |||
46 | } else if (ch == "#") { | 46 | } else if (ch == "#") { |
47 | stream.skipToEnd(); | 47 | stream.skipToEnd(); |
48 | return "comment"; | 48 | return "comment"; |
49 | } else if (ch == "<" && stream.eat("<")) { | 49 | } else if (ch == "<" && (m = stream.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { |
50 | stream.eat("-"); | 50 | return chain(readHereDoc(m[1]), stream, state); |
51 | stream.eat(/[\'\"\`]/); | ||
52 | var match = stream.match(/^\w+/); | ||
53 | stream.eat(/[\'\"\`]/); | ||
54 | if (match) return chain(readHereDoc(match[0]), stream, state); | ||
55 | return null; | ||
56 | } else if (ch == "0") { | 51 | } else if (ch == "0") { |
57 | if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); | 52 | if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); |
58 | else if (stream.eat("b")) stream.eatWhile(/[01]/); | 53 | else if (stream.eat("b")) stream.eatWhile(/[01]/); |