Skip to content

Commit

Permalink
Fixed wikitext link formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
harshad1 committed Sep 6, 2024
1 parent 2cdef58 commit 8c63366
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 "<audio src='%LINK%' controls><a href='%LINK%'>%TITLE%</a></audio>";
}
return "<audio src='%LINK%' controls><a href='%LINK%'>%TITLE%</a></audio>";
}

public static void showInsertImageOrLinkDialog(
Expand Down

0 comments on commit 8c63366

Please sign in to comment.