mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
external javadoc: don't append garbage to the view (IDEA-177046)
This commit is contained in:
@@ -25,13 +25,10 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<DL> <ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<DL> <dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a>, <a href="../../java/lang/CharSequence.html" title="interface in java.lang">CharSequence</a>, <a href="../../java/lang/Comparable.html" title="interface in java.lang">Comparable</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <span class="strong">String</span>
|
||||
extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a>
|
||||
|
||||
-2
@@ -24,6 +24,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
</HTML>
|
||||
+14
-6
@@ -256,12 +256,16 @@ public abstract class AbstractExternalFilter {
|
||||
StringBuilder classDetails = new StringBuilder();
|
||||
while (((read = buf.readLine()) != null) && !StringUtil.toUpperCase(read).equals(HR) && !StringUtil.toUpperCase(read).equals(P)) {
|
||||
if (reachTheEnd(data, read, classDetails, endSection)) return;
|
||||
appendLine(classDetails, read);
|
||||
if (!skipBlockList(read)) {
|
||||
appendLine(classDetails, read);
|
||||
}
|
||||
}
|
||||
|
||||
while (((read = buf.readLine()) != null) && !StringUtil.toUpperCase(read).equals(P) && !StringUtil.toUpperCase(read).equals(HR)) {
|
||||
while (((read = buf.readLine()) != null) && !StringUtil.toUpperCase(read).equals(HR) && !StringUtil.toUpperCase(read).equals(P)) {
|
||||
if (reachTheEnd(data, read, classDetails, endSection)) return;
|
||||
appendLine(data, read.replaceAll(DT, DT + BR));
|
||||
if (!skipBlockList(read)) {
|
||||
appendLine(data, read.replaceAll(DT, DT + BR));
|
||||
}
|
||||
}
|
||||
|
||||
data.append(classDetails);
|
||||
@@ -274,9 +278,7 @@ public abstract class AbstractExternalFilter {
|
||||
while (((read = buf.readLine()) != null) &&
|
||||
!endSection.matcher(read).find() &&
|
||||
StringUtil.indexOfIgnoreCase(read, GREATEST_END_SECTION, 0) == -1) {
|
||||
if (!StringUtil.toUpperCase(read).contains(HR)
|
||||
&& !StringUtil.containsIgnoreCase(read, "<ul class=\"blockList\">")
|
||||
&& !StringUtil.containsIgnoreCase(read, "<li class=\"blockList\">")) {
|
||||
if (!skipBlockList(read)) {
|
||||
appendLine(data, read);
|
||||
}
|
||||
}
|
||||
@@ -284,6 +286,12 @@ public abstract class AbstractExternalFilter {
|
||||
data.append(HTML_CLOSE);
|
||||
}
|
||||
|
||||
private static boolean skipBlockList(String read) {
|
||||
return StringUtil.toUpperCase(read).contains(HR) ||
|
||||
StringUtil.containsIgnoreCase(read, "<ul class=\"blockList\">") ||
|
||||
StringUtil.containsIgnoreCase(read, "<li class=\"blockList\">");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ParseSettings getParseSettings(@NotNull String url) {
|
||||
Pattern startSection = ourClassDataStartPattern;
|
||||
|
||||
Reference in New Issue
Block a user