PrettyFormatter: Fix ArrayIndexOutOfBoundException with CRLF files.
Change I6d82ce322d401743a8de5ab8090b2adc43a909f5 added a workaround for
a bug in prettify, by temporarily adding a space before each \n
character.
For files with CRLF line endings, this means replacing "\r\n" by
"\r<space>\n", which prettify sees as two lines. This leads to a
crash since Gerrit expects a consistent number of lines even after
prettify.
When Show Line Endings is active, the issue does not appear since \r
are replaced with a specific markup, without any actual \r.
Change-Id: I345e332225e449c6f26871476f1a07e67458da59
1 file changed