diff options
author | Linus Lee <linus@thesephist.com> | 2020-09-24 09:07:24 -0400 |
---|---|---|
committer | Linus Lee <linus@thesephist.com> | 2020-09-24 09:07:24 -0400 |
commit | bc69e7efa4777f8ebed37d032554b3f3df888744 (patch) | |
tree | c30f3868f7d2dc9cf0a17e5fc6d65bf895244e47 /static/js | |
parent | c82ee71b4d30c7568e9aa4ab764d982e268dca84 (diff) | |
download | tabloid-fake-closure-bc69e7efa4777f8ebed37d032554b3f3df888744.tar.gz tabloid-fake-closure-bc69e7efa4777f8ebed37d032554b3f3df888744.zip |
Add ability to use escaped strings, at least for quotes
Diffstat (limited to 'static/js')
-rw-r--r-- | static/js/lang.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/static/js/lang.js b/static/js/lang.js index 6ecc102..954b44d 100644 --- a/static/js/lang.js +++ b/static/js/lang.js @@ -89,7 +89,9 @@ class Wordifier { let acc = ''; acc += this.reader.readUntil(c => c == endChar); while (acc.endsWith('\\') || !this.reader.hasNext()) { - acc += this.reader.readUntil(c => c != endChar); + acc = acc.substr(0, acc.length - 1); + this.reader.next(); // endChar + acc += endChar + this.reader.readUntil(c => c == endChar); } this.reader.next(); // throw away closing char this.tokens.push('"' + acc); |