You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2026/01/29 16:09:04 UTC

Re: [I] Javadoc rendering issue with JDK API docs and code sections [netbeans]

mbien commented on issue #8963:
URL: https://github.com/apache/netbeans/issues/8963#issuecomment-3818656478

   > Recent versions of the JDK API docs have been adding "Copy" buttons for code sections, like for example here: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Class.html#newInstance%28%29
   
   the javadoc code for this looks like:
   
   ```
        * <p>The call
        *
        * {@snippet lang="java" :
        * clazz.newInstance()
        * }
        *
        * can be replaced by
        *
        * {@snippet lang="java" :
        * clazz.getDeclaredConstructor().newInstance()
        * }
   ```
   
   it seems like the browser is now also rendering inline snippets as code blocks.
   
   
   We could do the same and add newlines before and after:
   
   <img width="491" height="311" alt="Image" src="https://github.com/user-attachments/assets/cd0b9f8d-4270-4e36-8935-fe5ffaab9740" />
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists