9

Ran across this broken link here. Summit shows links differently to the webui, and probably also other apps. I think matching webui behavior is best here.

There seems to be more complex regex at play, including checking for matching brackets etc.. Probably best to dig that out of the sourcecode.

Examples:

Summit: https://en.m.wikipedia.org/wiki/Orion_(spacecraft)
Raw: https://en.m.wikipedia.org/wiki/Orion_(spacecraft)
Webui: https://en.m.wikipedia.org/wiki/Orion_(spacecraft)

Summit: https://example.org/aa(aa
Raw: https://example.org/aa(aa
Webui: https://example.org/aa(aa

Summit: https://example.org/aa(aa)
Raw: https://example.org/aa(aa)
Webui: https://example.org/aa(aa)

Interestingly while writing this, I noticed the rules for android long press text select also match webui behavior.

you are viewing a single comment's thread
view the rest of the comments
[-] Redjard@lemmy.dbzer0.com 3 points 7 months ago

Lemmyui seems to be using markdown-it, so the spec might be this re.tpl_link_fuzzy: https://github.com/markdown-it/linkify-it/blob/master/lib/re.mjs

That looks like it includes the bracket logic.

this post was submitted on 11 Aug 2025
9 points (100.0% liked)

Summit

1267 readers
1 users here now

Community to discuss Summit, an open-source Lemmy reader for Android.

App (Play Store): https://play.google.com/store/apps/details?id=com.idunnololz.summit

APK: https://github.com/idunnololz/summit-for-lemmy/releases

Source: https://github.com/idunnololz/summit

Support the app

Support me on Patreon

Website: https://summit.idunnololz.com/

founded 2 years ago
MODERATORS