Skip to content

Commit

Permalink
Merge branch 'main' into sbouchet-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sbouchet authored Oct 13, 2023
2 parents daa629d + 8006556 commit b0a2c9b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'

# Install Maven 3.9
- name: Set up Maven
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f #v4.5
Expand Down
2 changes: 1 addition & 1 deletion plugins/org.jboss.tools.quarkus.lsp4e/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.lsp4e,
org.eclipse.jdt.core.manipulation,
org.eclipse.jdt.ui,
org.eclipse.lsp4mp.jdt.core,
org.jsoup;bundle-version="1.8.3";visibility:=reexport,
org.eclipse.ui,
org.jboss.tools.foundation.ui,
org.apache.commons.lang3,
Expand All @@ -35,6 +34,7 @@ Bundle-ClassPath: .,
server/org.eclipse.lsp4mp.ls-uber.jar,
server/com.redhat.quarkus.ls.jar,
lib/remark.jar,
lib/jsoup.jar,
server/com.redhat.qute.ls-uber.jar
Bundle-Activator: org.jboss.tools.quarkus.lsp4e.QuarkusLSPPlugin
Export-Package: org.jboss.tools.quarkus.lsp4e
Expand Down
5 changes: 5 additions & 0 deletions plugins/org.jboss.tools.quarkus.lsp4e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
<artifactId>remark</artifactId>
<version>1.2.0</version>
</artifactItem>
<artifactItem>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.9.2</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.jboss.tools.quarkus.lsp4e.internal.ls;

import org.jsoup.internal.StringUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.nodes.TextNode;
Expand All @@ -46,7 +46,9 @@ public class HtmlToPlainText {
*/
public String getPlainText(Element element) {
FormattingVisitor formatter = new FormattingVisitor();
NodeTraversor.traverse(formatter, element); // walk the DOM, and call .head() and .tail() for each node
NodeTraversor traversor = new NodeTraversor(formatter);
traversor.traverse(element); // walk the DOM, and call .head() and .tail() for each node

return formatter.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.jboss.tools.quarkus.lsp4e.QuarkusLSPPlugin;
import org.jsoup.safety.Cleaner;
import org.jsoup.safety.Safelist;
import org.jsoup.safety.Whitelist;

import com.overzealous.remark.Options;
import com.overzealous.remark.Options.Tables;
Expand Down Expand Up @@ -50,7 +50,7 @@ public class JavaDoc2MarkdownConverter extends AbstractJavaDocConverter {
Field safelistField = Cleaner.class.getDeclaredField("safelist");
safelistField.setAccessible(true);

Safelist s = (Safelist) safelistField.get(c);
Whitelist s = (Whitelist) safelistField.get(c);

s.addProtocols("a", "href", "file", "jdt");
s.addProtocols("img", "src", "file");
Expand Down

0 comments on commit b0a2c9b

Please sign in to comment.