Skip to content

Commit 89d84ba

Browse files
authored
Merge pull request #1 from tuchida/escape-string
文字列リテラルでエスケープできるようにする
2 parents 42035af + 5f8215b commit 89d84ba

File tree

3 files changed

+190
-158
lines changed

3 files changed

+190
-158
lines changed

expressions/expressions_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ var evaluatorTests = []struct {
2121
{`'abc'`, "abc"},
2222
{`"abc"`, "abc"},
2323

24+
{`"a\\bc"`, "a\\bc"},
25+
{`"a\"bc"`, "a\"bc"},
26+
{`"\u007b\u007b abc \u007d\u007d"`, "{{ abc }}"},
27+
// TODO: single-quoted cannot be escaped
28+
// {`'a\'bc'`, "a'bc"},
29+
2430
// Variables
2531
{`n`, 123},
2632

0 commit comments

Comments
 (0)