From da853b14f4a64dea11d7e610ce3de5259f2b17b8 Mon Sep 17 00:00:00 2001 From: mulla028 Date: Sat, 14 Dec 2024 13:21:42 -0500 Subject: [PATCH] MarkdownFormatter renamed and now static --- .../gui/ai/components/summary/SummaryShowingComponent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java b/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java index a8f6f2cd14f..b9bc8e98e15 100644 --- a/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java +++ b/src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.java @@ -21,6 +21,7 @@ import jakarta.inject.Inject; public class SummaryShowingComponent extends VBox { + private static final MarkdownFormatter MARKDOWN_FORMATTER = new MarkdownFormatter(); @FXML private Text summaryInfoText; @FXML private CheckBox markdownCheckbox; @@ -29,7 +30,6 @@ public class SummaryShowingComponent extends VBox { private WebView contentWebView; private final Summary summary; private final Runnable regenerateCallback; - private final MarkdownFormatter markdownFormatter = new MarkdownFormatter(); public SummaryShowingComponent(Summary summary, Runnable regenerateCallback) { this.summary = summary; @@ -59,10 +59,10 @@ private void initializeWebView() { private void updateContent(boolean isMarkdown) { String content = summary.content(); if (isMarkdown) { - contentWebView.getEngine().loadContent(markdownFormatter.format(content)); + contentWebView.getEngine().loadContent(MARKDOWN_FORMATTER.format(content)); } else { contentWebView.getEngine().loadContent( - "" + + "" + "
" + content + "
"