Avoid accidentally supporing "$''"

This commit is contained in:
anordal 2017-02-16 22:11:04 +01:00
parent 5fb49ccbb6
commit bda2bfc253
2 changed files with 7 additions and 4 deletions

@ -449,10 +449,12 @@ fn common_str_cmd(
if i+1 < horizon.len() {
let c = horizon[i+1];
if c == b'\'' {
return Some(WhatNow {
tri: Transition::Push(Box::new(SitStrSqEsc{})),
pre: i, len: 2, alt: None
});
if need_quotes {
return Some(WhatNow {
tri: Transition::Push(Box::new(SitStrSqEsc{})),
pre: i, len: 2, alt: None
});
}
} else if c == b'(' {
let cmd_end = identifierlen(&horizon[i+2 ..]);
if i+2+cmd_end+1 >= horizon.len() {

@ -1 +1,2 @@
echo e$''e$'\n'e$'k\nk'e
echo "e$''e$'\n'e$'k\nk'e"