Markdown issue link shortener removes some characters after it#1161

Closed
opened 2022-07-03 15:31:17 +02:00 by qwerty287 · 4 comments
Contributor

Instead of (#123), (#123 is shown. As example, see #1155 (comment)
(first line)

Instead of `(#123)`, `(#123` is shown. As example, see https://codeberg.org/gitnex/GitNex/pulls/1155#issue-136954 (first line)
qwerty287 changed title from Markdown issue link shortener removes ) to Markdown issue link shortener removes some characters after it 2022-07-03 15:32:00 +02:00
Owner

Is this a custom function or by Markown?

Is this a custom function or by Markown?
Author
Contributor

That's a custom function. The code itself is in https://codeberg.org/gitnex/GitNex/src/branch/main/app/src/main/java/org/mian/gitnex/helpers/Markdown.java#L602-L623, but I'm not sure if the error is there.

That's a custom function. The code itself is in https://codeberg.org/gitnex/GitNex/src/branch/main/app/src/main/java/org/mian/gitnex/helpers/Markdown.java#L602-L623, but I'm not sure if the error is there.
Owner

So from my quick tests, I found these:

  • If you have a URL like https://codeberg.org/gitnex/GitNex/issues/1161 then this will break (missing) the characters after.
  • If use #1161, this will work fine.

Further digging from your provided file, I guess the problem is coming from the Regex, https://codeberg.org/gitnex/GitNex/src/branch/main/app/src/main/java/org/mian/gitnex/helpers/Markdown.java#L699.

So from my quick tests, I found these: - If you have a URL like `https://codeberg.org/gitnex/GitNex/issues/1161` then this will break (missing) the characters after. - If use `#1161`, this will work fine. Further digging from your provided file, I guess the problem is coming from the Regex, https://codeberg.org/gitnex/GitNex/src/branch/main/app/src/main/java/org/mian/gitnex/helpers/Markdown.java#L699.
Author
Contributor

If I remember correctly this regex was something from markwons sample application.

If I remember correctly this regex was something from markwons sample application.
mmarif added this to the 5.4.0 milestone 2024-03-07 15:55:58 +01:00
mmarif self-assigned this 2024-03-07 15:56:06 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#1161
No description provided.