Skip to content

Reduce excessive whitespace in large Javadoc hover documentation - #4385

Closed
amritamishra01 wants to merge 2 commits into
redhat-developer:mainfrom
amritamishra01:fix/issue-4219-long-javadoc-hover
Closed

amritamishra01 wants to merge 2 commits into
redhat-developer:mainfrom
amritamishra01:fix/issue-4219-long-javadoc-hover

Conversation

@amritamishra01

Copy link
Copy Markdown
Contributor

Summary

This PR reduces excessive whitespace in large Javadoc hover and completion documentation.

Long Javadoc content such as java.util.regex.Pattern preserved repeated spaces, tabs, and excessive blank lines, which inflated the rendered markdown size and caused large hover popups to waste vertical space.

Changes

  • collapse repeated spaces/tabs into a single space
  • collapse 3+ consecutive newlines into standard markdown paragraph spacing
  • trim leading/trailing whitespace
  • preserve existing jdt:// link rewriting behavior

Validation

Tested with java.util.regex.Pattern hover, especially the Quotation, Boundary matchers, and Special constructs sections that previously showed large whitespace gaps.

The hover now renders more compactly and allows significantly more regex constructs to be visible in the same viewport.

fixes# #4219

@datho7561

Copy link
Copy Markdown
Contributor

I think this should probably be addressed on the server side, so that all language servers can benefit from it.

@robstryker

Copy link
Copy Markdown
Contributor

I'm inclined to agree with @datho7561

@datho7561

Copy link
Copy Markdown
Contributor

Here's where I fixed it on the server side: eclipse-jdtls/eclipse.jdt.ls#3786. So I think I'll close this PR.

@datho7561 datho7561 closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants