diff --git a/mode/soy/soy.js b/mode/soy/soy.js index 79bfc24dfd..580c306f15 100644 --- a/mode/soy/soy.js +++ b/mode/soy/soy.js @@ -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"; }