mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Fixed: Fix markdown link generation
The `]` characters in label and `)` characters in url must be escaped.
This commit is contained in:
parent
501d13a0cb
commit
8ee0c5a6ec
1 changed files with 3 additions and 3 deletions
|
|
@ -119,9 +119,9 @@ public class MarkdownUtils {
|
|||
return "**" + label + "**: " + def + "\n";
|
||||
}
|
||||
|
||||
public static String getLinkMarkdownString(String label, Object object) {
|
||||
if (object != null)
|
||||
return "[" + label + "](" + object + ")";
|
||||
public static String getLinkMarkdownString(String label, String url) {
|
||||
if (url != null)
|
||||
return "[" + label.replaceAll("]", "\\\\]") + "](" + url.replaceAll("\\)", "\\\\)") + ")";
|
||||
else
|
||||
return label;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue