handle closing double quote properly

Related #249
This commit is contained in:
Gokcehan committed 2019-10-26 03:05:07 +03:00
1 parent 74ef9fcd83
commit 8327505398
2 files changed
+13

No files matched your search

+12
View File
@@ -131,6 +131,18 @@ var gEvalTests = []struct {
[]expr{&setExpr{"hidden", ""}, &setExpr{"preview", ""}},
},
{
`set ifs ""`,
[]string{"set", "ifs", "", "\n"},
[]expr{&setExpr{"ifs", ""}},
},
{
`set ifs "\n"`,
[]string{"set", "ifs", "\n", "\n"},
[]expr{&setExpr{"ifs", "\n"}},
},
{
"set ratios 1:2:3",
[]string{"set", "ratios", "1:2:3", "\n"},
+1
View File
@@ -249,6 +249,7 @@ scan:
buf = append(buf, '\\', s.chr)
}
s.next()
continue
}
buf = append(buf, s.chr)
s.next()