Skip to content

Commit

Permalink
[ruby mode] Require dash or tilde at start of heredoc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh authored and cone56 committed Jan 6, 2020
1 parent ee37c14 commit 4edca5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/ruby/ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CodeMirror.defineMode("ruby", function(config) {
} else if (ch == "#") {
stream.skipToEnd();
return "comment";
} else if (ch == "<" && (m = stream.match(/^<(-)?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) {
} else if (ch == "<" && (m = stream.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) {
return chain(readHereDoc(m[2], m[1]), stream, state);
} else if (ch == "0") {
if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/);
Expand Down

0 comments on commit 4edca5f

Please sign in to comment.