-
Notifications
You must be signed in to change notification settings - Fork 3
Extra \n in unterminated aic command at EOF #2
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
$ cat x.sed
3i\
foo\
$ sedparse -f x.sed
[
{
"a1": {
"addr_number": 3,
"addr_type": 3
},
"cmd": "i",
"line": 1,
"x": {
"cmd_txt": {
"text": [
"f",
"o",
"o",
"\\",
"\n",
"\n"
]
}
}
}
]
$Note that inside x.cmd_txt.text, there's a double \n when there should be only one.
In the x.sed file, the last line is foo\, which implies there will be a new line to the i command text. But there isn't. Note that for GNU sed, it works the same as if it was a normal foo in the last line:
$ seq 5 | sed -e '3i\' -e 'foo'
1
2
foo
3
4
5
$ seq 5 | sed -e '3i\' -e 'foo\'
1
2
foo
3
4
5
$sedparse should not return that extra \n in this case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working