Using the pre tag in documentation comments causes automatic formatting to break lines
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 25
### What happened
If you code as below:
```
/**
*
*
{@code
* Decimal uzDecimal = Decimal.valueOf(10);
* }
*/
```
It will be changed as follows. An error will occur during the Javadoc generation process at compile time.
```
/**
*
* <
* pre>{@code
* Decimal uzDecimal = Decimal.valueOf(10);
* }
*/
```
### Language / Project Type / NetBeans Component
Java Maven Web application project
### How to reproduce
If you code as below:
```
/**
*
*
{@code
* Decimal uzDecimal = Decimal.valueOf(10);
* }
*/
```
Setting Options
[.zip](https://github.com/user-attachments/files/20074441/default.zip)
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11 pro
### JDK
JDK21
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start with the supplied reproduction and inspect NetBeans' automatic formatting for Java documentation comments containing a
tag. Verify the formatter's output and Javadoc compilation; done when the tag is preserved and the example generates successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100