From 8c633669a85af3d82a1169516b56649b4c40ae0f Mon Sep 17 00:00:00 2001 From: Harshad Vedartham Date: Fri, 6 Sep 2024 14:21:53 -0700 Subject: [PATCH] Fixed wikitext link formatting --- .../gsantner/markor/frontend/AttachLinkOrFileDialog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/gsantner/markor/frontend/AttachLinkOrFileDialog.java b/app/src/main/java/net/gsantner/markor/frontend/AttachLinkOrFileDialog.java index 36449d3dd6..75f2403eb7 100644 --- a/app/src/main/java/net/gsantner/markor/frontend/AttachLinkOrFileDialog.java +++ b/app/src/main/java/net/gsantner/markor/frontend/AttachLinkOrFileDialog.java @@ -62,7 +62,7 @@ private static String getLinkFormat(final int textFormatId) { if (textFormatId == FormatRegistry.FORMAT_MARKDOWN) { return "[%TITLE%](%LINK%)"; } else if (textFormatId == FormatRegistry.FORMAT_WIKITEXT) { - return "[[LINK|TITLE]]"; + return "[[%LINK%|%TITLE%]]"; } else if (textFormatId == FormatRegistry.FORMAT_ASCIIDOC) { return "link:%LINK%[%TITLE%]"; } else if (textFormatId == FormatRegistry.FORMAT_TODOTXT) { @@ -74,9 +74,10 @@ private static String getLinkFormat(final int textFormatId) { private static String getAudioFormat(final int textFormatId) { if (textFormatId == FormatRegistry.FORMAT_WIKITEXT) { - return "[[LINK|TITLE]]"; + return "[[%LINK%|%TITLE%]]"; + } else { + return ""; } - return ""; } public static void showInsertImageOrLinkDialog(