diff --git a/lib/js/codemirror.js b/lib/js/codemirror.js index c98948037..0bdc02524 100644 --- a/lib/js/codemirror.js +++ b/lib/js/codemirror.js @@ -67,7 +67,7 @@ CodeMirror.defineMode("lips", function () { function isHexNumber (stream) { return stream.match(hexMatcher); } - + function processEscapedSequence(stream, options) { var next, escaped = false; while ((next = stream.next()) != null) { @@ -165,7 +165,11 @@ CodeMirror.defineMode("lips", function () { state.mode = "symbol"; returnType = SYMBOL; } else if (ch == '#') { - if (stream.eat("|")) { // Multi-line comment + if (stream.eat(/\\/)) { + if (stream.match(/[0-9a-f]+/) || stream.match(/./u)) { + returnType = STRING; + } + } else if (stream.eat("|")) { // Multi-line comment state.mode = "comment"; // toggle to comment mode returnType = COMMENT; } else if (stream.eat(/[tf]/i)) { // #t/#f (atom)