Fixed IDEA-166202 <pre> tags in Javadoc should not be wrapped

This commit is contained in:
Rustam Vishnyakov
2018-02-19 18:14:11 +03:00
parent 13a3221e34
commit 268a8b8bfc
2 changed files with 8 additions and 4 deletions
@@ -362,7 +362,7 @@ public class JDParser {
continue;
}
while (true) {
if (seq.length() < width) {
if (seq.length() < width || isMarked) {
// keep remaining line and proceed with next paragraph
seq = isMarked ? seq : seq.trim();
list.add(seq);
@@ -515,7 +515,8 @@ public int method(int parameter) {
getSettings().WRAP_LONG_LINES = true
doClassTest(
""" /**
"""
/**
* @return <pre>this is a return value documentation with a very long description
* that is longer than the right margin.</pre>
*/
@@ -523,8 +524,9 @@ public int method(int parameter) {
return 0;
}""",
"""/**
* @return <pre>this is a return value documentation with a very long
"\n/**\n" +
" * @return <pre>this is a return value documentation with a very long " +
"""
* description
* that is longer than the right margin.</pre>
*/
@@ -1144,6 +1146,7 @@ interface Test {
* class Foo {
* private int x;
* private int y;
* // The comment inside pre tag which shouldn't be wrapped despite being long
* }
* </pre>
* @return Some value
@@ -1163,6 +1166,7 @@ interface Test {
* class Foo {
* private int x;
* private int y;
* // The comment inside pre tag which shouldn't be wrapped despite being long
* }
* </pre>
*