Skip to content

Javadoc viewer shows HTML comments #9018

@nmatt

Description

@nmatt

Apache NetBeans version

Apache NetBeans 28

What happened

The javadoc viewer in the editor shows HTML comments contained within the javadoc comment, although such HTML comments aren't visible in generated API docs (HTML files viewed in a regular HTML viewer or browser).

Example:
Image

Language / Project Type / NetBeans Component

Javadoc

How to reproduce

Create a Java class with a javadoc comment containing an HTML comment like <!--some comment -->. Invoke the javadoc viewer for the class (e.g. Ctrl+Shift+Space).

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

This is inconvenient when using the javadoc viewer to assess how the javadoc one is writing will appear in an HTML viewer. For example, I'm using HTML markup within a <pre> element, and use HTML comments to align the text content in the source (to compensate for different markup on different lines) the same as it would appear in the rendered output. However, the javadoc viewer destroys that alignment by showing the HTML comments.

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Contribution welcomeAn issue or feature not currently being worked on, but a contribution would be welcomed!Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)JavaDoc[ci] enable java/javadoc tests and build-javadoc targetkind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions