RFR [16] 8252172: Improve prettiness of printing HTML attributes by DocPretty
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri Aug 28 14:20:58 UTC 2020
Looks good.
-- Jon
On 8/28/20 2:31 AM, Pavel Rappo wrote:
> Hello,
>
> Please review the below change for https://bugs.openjdk.java.net/browse/JDK-8252172
>
> http://cr.openjdk.java.net/~prappo/8252172/webrev.00/
>
> The crux of the change is this:
>
> @@ -497,7 +492,7 @@ public class DocPretty implements DocTreeVisitor<Void,Void> {
> List<? extends DocTree> attrs = node.getAttributes();
> if (!attrs.isEmpty()) {
> print(" ");
> - print(attrs);
> + print(attrs, " ");
> DocTree last = node.getAttributes().get(attrs.size() - 1);
> if (node.isSelfClosing() && last instanceof AttributeTree
> && ((AttributeTree) last).getValueKind() == ValueKind.UNQUOTED)
>
> That fixes printing out HTML attributes, which were otherwise squeezed together: for example, a=b c=d e=f was printed out as a=bc=de=f.
> The rest of the change consists of a test for that and some opportunistic cleanup.
>
> Thanks,
> -Pavel
>
More information about the compiler-dev
mailing list