Peter wrote:

>>FWIW, this avoids it:
>>
>>   name = "peter"
>>   print "<user name=\"#{name}\"></user>"
>>
>>So it evidently has to do specifically with the escaped terminator
>>*inside* the interpolated part.
> 
> 
> I know this avoids it, but it was when the name=\"#{name}\" needed to
> become optional, I moved it all inside the #{} and used the ? : operator
> to either generate the "name=\"" + name + "\"" or else a simple "".

Oh, yes. Of course.

Well, all I can say now is that it only seems to complain when the
escaped terminator is the same terminator that would end the string
that surrounds the interpolated piece.

So if you mix quotes (as in Michael Garriss's reply) you should be OK.

Hal