Below is an excerpt from Gnu sed's documentation at https://www.gnu.org/software/sed/manual/sed.html
i text insert text before a line. This is a GNU extension to the standard i command - see below for details. i\ text Immediately output the lines of text which follow this command.
The wording of these two syntaxes is quite different. In the past, I thought they have the exact same behavior and it's just the syntax is different. I did a bunch of experiment and all tests give the same result. I want to confirm, are there any differences between these two syntaxes? Thanks in advance.
3,4ifoo) works with both syntaxes. You can have a look at the source code,