Commit 5f80b746 authored by conorshipp's avatar conorshipp Committed by Evan W. Patton

Support carriage return "\r" in blocks language

Resolves #1090
parent 8ecc6161
...@@ -487,9 +487,9 @@ Blockly.Yail.quotifyForREPL = function(s) { ...@@ -487,9 +487,9 @@ Blockly.Yail.quotifyForREPL = function(s) {
for (var i = 0; i < len; i++) { for (var i = 0; i < len; i++) {
c = s.charAt(i); c = s.charAt(i);
if (c == '\\') { if (c == '\\') {
// If this is \n or \t don't slashify the backslash // If this is \n, \t or \r don't slashify the backslash
// TODO(user): Make this cleaner and more general // TODO(user): Make this cleaner and more general
if (!(i == lastIndex) && (s.charAt(i + 1) == 'n' || s.charAt(i + 1) == 't')) { if (!(i == lastIndex) && (s.charAt(i + 1) == 'n' || s.charAt(i + 1) == 't' || s.charAt(i + 1) == 'r')) {
sb.push(c); sb.push(c);
sb.push(s.charAt(i + 1)); sb.push(s.charAt(i + 1));
i = i + 1; i = i + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment