pulumi / pulumi-java

Java support for Pulumi
Apache License 2.0
64 stars 19 forks source link

Escape javadoc special characters #1342

Closed iwahbe closed 3 months ago

iwahbe commented 3 months ago

Description

Fixes #1271

Correctly scope comment escapes to outside of code blocks. The resulting code is both more idiomatic javadoc and safe to embed.

I have two motivating examples:

  1. Correctness: Upstream comments that start lines with @pattern will now be escaped to {@literal @}pattern. This has prevented us from publishing in the past (https://github.com/pulumi/pulumi-gcp/issues/1950, https://github.com/pulumi/pulumi-auth0/issues/516, https://github.com/pulumi/pulumi-azure/issues/1979)

  2. Idiomaticity: Generated code blocks will no longer be HTML escaped (since they don't need to be). Instead, they will render correctly.

Checklist