Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with HTML Rendering in Content Assist Completion Proposal #650

Closed
vgcpge opened this issue May 19, 2023 · 0 comments · Fixed by #653
Closed

Issue with HTML Rendering in Content Assist Completion Proposal #650

vgcpge opened this issue May 19, 2023 · 0 comments · Fixed by #653

Comments

@vgcpge
Copy link

vgcpge commented May 19, 2023

Screenshot 2023-05-18 at 22 30 07

There appears to be an issue with the content assist completion proposal display, where raw HTML is shown to the user. This seems to stem from the method org.eclipse.lsp4e.operations.hover.FocusableBrowserInformationControl.styleHtml(), which inserts styles at the -1 position, thereby disrupting pre-existing elements in the content. The link to the specific line in the source code is here.

The issue is further exacerbated by the LSCompletionProposal.getAdditionalProposalInfo() method. This method doesn't seem to allow for a valid <head> element in completion proposal details, as it wraps entirety of org.eclipse.lsp4j.CompletionItem.getDetail() return value within a <p> (paragraph), as shown here. As per HTML standards, the <head> element cannot be contained within a <p> element.

The problem was originally discovered in vgcpge/eclipse.copilot#6

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 a pull request may close this issue.

1 participant