Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTML escaping after literals in non-code Javadoc
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
- Loading branch information