enable double quotes also in special case of leading \
This commit is contained in:
parent
c9647cc7ec
commit
eb15768095
|
|
@ -269,8 +269,7 @@ nloop:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* if " or `, read until next " or ` is hit, will form a new word,
|
/* if " or `, read until next " or ` is hit, will form a new word,
|
||||||
including the quotes.
|
including the quotes. */
|
||||||
In case of \, the next character gets the eights bit set. */
|
|
||||||
case '"':
|
case '"':
|
||||||
case '`':
|
case '`':
|
||||||
d = c;
|
d = c;
|
||||||
|
|
@ -282,6 +281,9 @@ nloop:
|
||||||
if (c == '\\') {
|
if (c == '\\') {
|
||||||
push(&linebuf, c);
|
push(&linebuf, c);
|
||||||
c = cp_readchar(&string, cp_inp_cur);
|
c = cp_readchar(&string, cp_inp_cur);
|
||||||
|
/* found our end char already here, so leave while loop */
|
||||||
|
if (c == d)
|
||||||
|
break;
|
||||||
push(&buf, c);
|
push(&buf, c);
|
||||||
push(&linebuf, c);
|
push(&linebuf, c);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue