pulumi / pulumi-java

Java support for Pulumi
Apache License 2.0
69 stars 21 forks source link

Fix HTML escaping after literals in non-code Javadoc #1409

Closed lunaris closed 2 months ago

lunaris commented 2 months ago

When formatting Javadocs, we use a state machine to track what we should be escaping and when. In the case of non-code blocks, we generally HTML-escape all characters except @, which must be encoded using a Javadoc {@literal @} block. If we see a sequence of @ characters, we enter a state where we try to print as many @s as possible before closing the @literal block. Unfortunately, there is a bug whereby when closing the literal block (because we have seen a non-@ character), we do not HTML-escape the first character after it. This commit fixes this issue.

Fixes #1408