From d917841896d068f8f58b60e0a1280cd3c723f818 Mon Sep 17 00:00:00 2001 From: test Date: Mon, 5 Aug 2024 15:30:20 +1000 Subject: [PATCH] Update MarkupUtil.java --- src/main/java/link/locutus/discord/util/MarkupUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/link/locutus/discord/util/MarkupUtil.java b/src/main/java/link/locutus/discord/util/MarkupUtil.java index a4495c3f..7f60572e 100644 --- a/src/main/java/link/locutus/discord/util/MarkupUtil.java +++ b/src/main/java/link/locutus/discord/util/MarkupUtil.java @@ -326,6 +326,7 @@ public static String transformURLIntoMarkup(String text){ private static final HtmlRenderer MARKDOWN_RENDERER; static { MARKDOWN_TO_HTML.set(Parser.EXTENSIONS, Arrays.asList(StrikethroughExtension.create())); + MARKDOWN_TO_HTML.set(HtmlRenderer.SOFT_BREAK, "
"); MARKDOWN_PARSER = Parser.builder(MARKDOWN_TO_HTML).build(); MARKDOWN_RENDERER = HtmlRenderer.builder(MARKDOWN_TO_HTML).build(); } @@ -341,6 +342,7 @@ public static String markdownToHTML(String source) { } html = transformURLIntoLinks(html); } + System.out.println("HTML " + html); return html.replaceAll("\n", ""); // // source = source.replace("_", "\u200B\t").replace(" * ", "\u200B\r");