Skip to content

Commit

Permalink
[soy mode] Support backslash in strings
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana authored and marijnh committed Jun 2, 2016
1 parent df3a0ae commit dabefce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mode/soy/soy.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@
return tokenUntil(stream, state, /\{\/literal}/);

case "string":
if (stream.match(/^.*?"/)) {
state.soyState.pop();
} else {
var match = stream.match(/^.*?("|\\[\s\S])/);
if (!match) {
stream.skipToEnd();
} else if (match[1] == "\"") {
state.soyState.pop();
}
return "string";
}
Expand Down

0 comments on commit dabefce

Please sign in to comment.