Skip to content

Commit

Permalink
Markdown: Open link action: Fix open links when Markdown link has spa…
Browse files Browse the repository at this point in the history
…ce at end
  • Loading branch information
gsantner committed Jan 18, 2025
1 parent 12671c2 commit 5bbddcf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ public static Link extract(final CharSequence text, final int pos) {
final int start = m.start(), end = m.end();
if (start <= po && end >= po) {
final boolean isImage = m.group(1) != null;
return new Link(m.group(2), m.group(3), isImage, start, end);
final String link = m.group(3);
return new Link(m.group(2), link == null ? null : link.trim(), isImage, start, end);
}
}
}
Expand Down

0 comments on commit 5bbddcf

Please sign in to comment.