OK, thanks; I'll revert back to using \R.
-- Jon
On 12/18/19 6:46 AM, Jim Laskey wrote:
Possibly, since the match is likely more expensive than the replace,
which is just appending to the sb in both cases.
On Dec 18, 2019, at 10:38 AM, Jonathan Gibbons
mailto:jonathan.gibb...@oracle.com>> w
Possibly, since the match is likely more expensive than the replace, which is
just appending to the sb in both cases.
> On Dec 18, 2019, at 10:38 AM, Jonathan Gibbons
> wrote:
>
> Hi Jim,
>
> I started off using \R, but that unnecessarily matches \n as well as \r and
> \r\n. In this conte
Note: you can use the regular expression \R to match line terminators. A bit
faster than your pattern. I found this out when testing String::lines() (which
was faster still.)
Cheers,
— Jim
On the road.
> On Dec 17, 2019, at 8:29 PM, Jonathan Gibbons
> wrote:
>
>
> Updated webrev. This ve
Note: you can use the regular expression \R to match line terminators. A bit
faster than your pattern. I found this out when testing String::lines() (which
was faster still.)
Cheers,
— Jim
On the road.
> On Dec 17, 2019, at 8:29 PM, Jonathan Gibbons
> wrote:
>
>
> Updated webrev. This ve
Hi Jim,
I started off using \R, but that unnecessarily matches \n as well as \r
and \r\n. In this context, we're only looking to replace newlines
containing \r. Do you still think using \R would be better?
-- Jon
On 12/17/19 5:00 PM, James Laskey wrote:
Note: you can use the regular expres
Updated webrev. This version uses a regular expression and .replaceAll
to replace \r\n? with \n in RawHtml. No other changes.
http://cr.openjdk.java.net/~jjg/8236048/webrev.01/
-- Jon
On 12/17/2019 10:44 AM, Jonathan Gibbons wrote:
Inline...
On 12/17/2019 05:51 AM, Pavel Rappo wrote:
Jon
Inline...
On 12/17/2019 05:51 AM, Pavel Rappo wrote:
Jon,
Could you please explain why "generated files should only contain \n"?
I don't have a robust spec-based answer, so the answer is more along the
lines of ...
* because we've always done it this way ... related, back in the day,
Apa
Jon,
Could you please explain why "generated files should only contain \n"?
Is it possible to perform the `rawHtml.indexOf('\r') == -1` optimization check
first thing in
normalizeNewlines?
New mechanics of string normalization is more readable, albeit is probably
slower in a typical case.
Old
Please review a moderately simple change for javadoc, to improve the way
that newlines in user input (doc comments and values for command-line
options) are handled, reducing the amount of overall string copying.
The underlying issue is that user newlines may be \n, \r or \r\n, but
the generate