sam regexp: $ doesn't match end of line when there is no newline
Opened this issue · 0 comments
GoogleCodeExporter commented
test text in /dev/snarf:
{{{
grammatikidis.punked.us
eekee.mooo.com
ethan.uk.to
testing.ethan.uk.to
terenia.mooo.com
}}}
test:
{{{
echo ',x/^/i/./
,x/\n/c/ /
,x/ +$/c/\n/
w
' | sam -d /dev/snarf
}}}
the last regexp, / +$/, doesn't match because all the newlines have been
deleted.
i confirmed it's the $ which doesn't match by eliminating the other parts; it
matched only when i added a space to the end of terenia.mooo.com in the source
and changed the regexp to just two spaces, no $.
acme doesn't have this bug, but produces 'warning: changes out of sequence'.
this warning appears to be nonsense. if it followed the expressions according
to the syntax, how could it make the changes out of order? obviously acme can't
be scripted in the same way. i tested it by selecting all within the quotes in
the test above, and applying it to Edit on a window containing the test text.
Original issue reported on code.google.com by tereniao...@gmail.com
on 24 Oct 2014 at 4:26