chore: Update dependencies

This commit is contained in:
FalsePattern 2023-08-16 13:33:44 +02:00 committed by FalsePattern
parent 79dcf2f52f
commit d45a99ceae
Signed by: falsepattern
GPG key ID: FDF7126A9E124447
3 changed files with 13 additions and 10 deletions

View file

@ -47,9 +47,9 @@ repositories {
dependencies { dependencies {
compileOnly(libs.annotations) compileOnly(libs.annotations)
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.21.0") implementation(libs.lsp4j)
implementation("com.vladsch.flexmark:flexmark:0.34.60") implementation(libs.flexmark)
implementation("org.apache.commons:commons-lang3:3.12.0") implementation(libs.commonsLang)
} }
intellij { intellij {

View file

@ -1,6 +1,9 @@
[versions] [versions]
# libraries # libraries
annotations = "24.0.1" annotations = "24.0.1"
lsp4j = "0.21.0"
flexmark = "0.64.8"
commonsLang = "3.13.0"
# plugins # plugins
kotlin = "1.9.0" kotlin = "1.9.0"
@ -12,6 +15,9 @@ grammarkit = "2022.3.1"
[libraries] [libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" } annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
lsp4j = { group = "org.eclipse.lsp4j", name = "org.eclipse.lsp4j", version.ref = "lsp4j" }
flexmark = { group = "com.vladsch.flexmark", name = "flexmark", version.ref = "flexmark" }
commonsLang = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commonsLang" }
[plugins] [plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }

View file

@ -19,7 +19,6 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.ui.UIUtil; import com.intellij.util.ui.UIUtil;
import com.vladsch.flexmark.html.HtmlRenderer; import com.vladsch.flexmark.html.HtmlRenderer;
import com.vladsch.flexmark.parser.Parser; import com.vladsch.flexmark.parser.Parser;
import com.vladsch.flexmark.util.options.MutableDataSet;
import org.eclipse.lsp4j.Hover; import org.eclipse.lsp4j.Hover;
import org.eclipse.lsp4j.MarkedString; import org.eclipse.lsp4j.MarkedString;
import org.eclipse.lsp4j.MarkupContent; import org.eclipse.lsp4j.MarkupContent;
@ -61,9 +60,8 @@ public class HoverHandler {
"```" + markedString.getLanguage() + " " + markedString.getValue() + "```" : "```" + markedString.getLanguage() + " " + markedString.getValue() + "```" :
""; "";
} }
MutableDataSet options = new MutableDataSet(); Parser parser = Parser.builder().build();
Parser parser = Parser.builder(options).build(); HtmlRenderer renderer = HtmlRenderer.builder().build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();
if (!string.isEmpty()) { if (!string.isEmpty()) {
result.add(renderer.render(parser.parse(string))); result.add(renderer.render(parser.parse(string)));
} }
@ -77,9 +75,8 @@ public class HoverHandler {
if (markedContent.isEmpty()) { if (markedContent.isEmpty()) {
return ""; return "";
} }
MutableDataSet options = new MutableDataSet(); Parser parser = Parser.builder().build();
Parser parser = Parser.builder(options).build(); HtmlRenderer renderer = HtmlRenderer.builder().build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();
return "<html>" + renderer.render(parser.parse(markedContent)) + "</html>"; return "<html>" + renderer.render(parser.parse(markedContent)) + "</html>";
} else { } else {
return ""; return "";