jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

!community@instance is not clickable if has a exclamation mark before it.

Open MV-GH opened this issue 1 year ago • 1 comments

Jerboa Version latest from main

Describe the bug A community@instance is not clickable if it has a exclamation mark before it. Instead it will just collapse the comment.

To Reproduce Try to click on it

go to this post https://lemmy.dbzer0.com/post/81613 try to click on !piracy... link

It does get properly turned into a visible @ but it is not clickable while lemmy-ui doesnt even turn it into a @.

How it looks on lemmy-ui image

How it looks on jerboa image

This post https://lemmy.dbzer0.com/post/81613

Demo

https://github.com/dessalines/jerboa/assets/67873169/1eb15add-9d39-46d7-bf64-2a388d9407aa

MV-GH avatar Jun 21 '23 13:06 MV-GH

Huh weird i have found cases where it does work

this post https://lemmy.world/post/344160 lemmy-ui

image

jerboa image

MV-GH avatar Jun 21 '23 15:06 MV-GH

image Its including the space

MV-GH avatar Jun 21 '23 19:06 MV-GH

/**
 * Pattern to match lemmy's unique community pattern, e.g. !commmunity[@instance]
 */
val lemmyCommunityPattern: Pattern =
    Pattern.compile("(?:^|\\s)!($communityPatternFragment)(?:@($instancePatternFragment))?\\b")

Does this whitespace capture have to be there?

MV-GH avatar Jun 21 '23 19:06 MV-GH