JavaDoc "pre" tags are not formatting correctly #254
-
We are using Roaster to read source files, make a few changes, then save the results to new source files. Most of this is working quite well. One issue, however, is how "pre" tags are handled: all of the text inside of a "pre" tag ends up in a single line. For example, if the input file is:
Processing it gives us:
This is the source code that reads the
Is there something we're doing wrong here? If not, is there a work-around or fix for this? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Seems to be an Eclipse JDT parsing issue. It can be easily reproducible by doing this: String data = """
/**
* <pre>
* All | of | this | should | be | aligned
* but | it | is | merged | into | a
* single | line |
* </pre>
*/
public interface TestInterface {
}
""";
ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(data.toCharArray());
ASTNode ast = parser.createAST(null);
System.out.println(ast); It outputs: /**
* <pre> All | of | this | should | be | aligned but | it | is | merged | into | a single | line | </pre>
*/
public interface TestInterface {
} |
Beta Was this translation helpful? Give feedback.
Seems to be an Eclipse JDT parsing issue. It can be easily reproducible by doing this:
It outputs: