-
Notifications
You must be signed in to change notification settings - Fork 133
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
Incorrect white-space auto-formatting inside Javadoc code tags #3340
Comments
After some debugging, it looks like part of the issue is with the method I do not fully understand why this is the case, but when handling the This is tested with JDK 21. |
Please rewrite your testcase as Junit Test for JDT and provide a PR. |
Hello, |
Consider the following code that auto-formats a Javadoc comment, represented as a String:
I would expect that the result of the two
format
calls be the same. However, the actual output is:The only difference between the first and the second output is that the first one does not contain a space before
b
, while the second one does.It seems to me that the second output is the correct one, because I don't think text inside pre/code blocks should be formatted, and there is a space before the
b
in the source text. In any case, I don't see why adding a line break before thepre
tag should change the output.This was tested with version 3.39.0 of the Maven artifact
org.eclipse.jdt:org.eclipse.jdt.core
.The text was updated successfully, but these errors were encountered: