[jdk19] RFR: 8281969: Bad result for the snippet @link tag if substring/regex consists of whitespace [v4]
Jonathan Gibbons
jjg at openjdk.org
Thu Jul 14 22:08:23 UTC 2022
On Thu, 14 Jul 2022 21:29:48 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> One thing to consider is that the snippet's markup @link tag is somewhat more powerful than the Standard doclet's {@link} tag. The former can be applied to regions that span multiple lines. In that case, we need to decide whether it's going to be a single link or multiple links, one per line.
>
>The simpler, the better.
I'm not sure this argument helps here. I think that a single multi-line link would look sufficiently ugly that either no-one would use it or we'd get complaints in the form of bug reports. So, I'll ignore that argument, at least for now, and focus on the issue of leading and trailing whitespace characters. With respect to that, the only visible differences between the output generated by the old and new code is when a user can explicitly uses a string or regex that matches leading and/or trailing whitespace. And, like many issues these days, if you don't like it, don't do it: if you don't want your leading and trailing whitespace to be included in the link, say so, by adjusting the string or regex.
Approved, I guess.
-------------
PR: https://git.openjdk.org/jdk19/pull/142
More information about the javadoc-dev
mailing list