Skip to content
Snippets Groups Projects
Commit 82162728 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[shell mode] Improve tokenizing of $'' strings

Closes #4505
parent 73638df4
No related branches found
No related tags found
No related merge requests found
......@@ -108,8 +108,8 @@ CodeMirror.defineMode('shell', function() {
if (state.tokens.length > 1) stream.eat('$');
var ch = stream.next(), hungry = /\w/;
if (ch === '{') hungry = /[^}]/;
if (ch === '(') {
state.tokens[0] = tokenString(')');
if (/['"(]/.test(ch)) {
state.tokens[0] = tokenString(ch == "(" ? ")" : ch);
return tokenize(stream, state);
}
if (!/\d/.test(ch)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment