Javadoc: enable syntax highlighting for code snippets#8874
Merged
mbien merged 1 commit intoapache:masterfrom Oct 1, 2025
Merged
Javadoc: enable syntax highlighting for code snippets#8874mbien merged 1 commit intoapache:masterfrom
mbien merged 1 commit intoapache:masterfrom
Conversation
- sets '--syntax-highlight' on JDK 25 and later
- which enables syntax highlighting for code fragments in '{@snippet}'
tags and '<pre><code>' elements
ebarboni
approved these changes
Oct 1, 2025
Contributor
There was a problem hiding this comment.
LGTM,
there is lots of over inline styled <pre> present in the javadoc.
maybe using snippet a bit more could make javadoc more readable on code side and on website were there is more span than "code"
https://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/doc-files/api.html
Member
Author
|
it doesn't have to be a snippet I think, it should also handle
I checked and the inline-styled sections do still look good. We don't have to change them but we would have the option now during rewrites/updates. merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is for the API doc of the NetBeans project.
--syntax-highlighton JDK 25 and later{@snippet}tags and<pre><code>elementsAPI doc for
CharSequencesas example (compare with NB 27 version.):