Skip to content

Avoid inserting a paragraph tag before a Javadoc div - #1534

Open
doomfrawen wants to merge 3 commits into
google:masterfrom
doomfrawen:fix/javadoc-div-paragraph
Open

doomfrawen wants to merge 3 commits into
google:masterfrom
doomfrawen:fix/javadoc-div-paragraph

Conversation

@doomfrawen

Copy link
Copy Markdown

The formatter used to insert <p> before <div> in classic Javadoc. Preserve the blank line without inserting a paragraph tag. The regression test covers surrounding prose, inline elements, explicit markup and second-pass formatting.

Tested the packaged CLI and ran the core Maven suite on JDK 25: 2,001 passed, two skipped.

Fixes #1180

Recognize a div opening tag as a block in classic Javadoc. Preserve paragraph inference for surrounding prose and inline elements.
Preserve same-line divs and explicitly written paragraph tags, including comments formatted by previous releases.
@google-cla

google-cla Bot commented Nov 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GJF adds <p> tag prior to the <div> tag

1 participant