found by sed -i -f ref.sed */*.yaml
--------------------ref.sed --------------------
{
N;
N;
N;
s#\([^\n]*\n\)\([^\n]*\)\n\1\2#\1\2#g;
P;
D;
}
------------------------------------------------
meaning: by default it reads in one line from the file
then the 3 N; commands say "add a \n and read in the next line
which leaves a one-line pattern containing 4 lines separated by \n
then search for line1\nline2\n repeated \1\2
and replace with \1\2.
likely nothing has happened, so P; print up to the first \n (aka line1)
so that we don't lose that line
D; delete up to the first \n
so that it isn't in the pattern buffer any more,
and next search starts line2
and then repeat.
Note that the pattern gets rather huge
because while we only remove one line at a time,
we unnecessarily append 3 more lines (instead of just one).
But that doesn't seem to cause the search to fail...
Change-Id: I440bca873483dc7f1716881113807fe121fe6a4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169045
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Justin Luth <jluth@mail.com>
UNO Framework
Toolbars, menus, UNO stuff, including accelerators and interaction, etc.