Skip to content

Conversation

@BentiGorlich
Copy link
Member

A lemmy community link often looks like: [[email protected]](https://domain.tld/c/community) which is just rendered as a link at the moment, render such links as the new inline preview

A lemmy community link often looks like: `[[email protected]](https://domain.tld/c/community)` which is just rendered as a link at the moment, render such links as the new inline preview
@BentiGorlich BentiGorlich added enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end labels Feb 14, 2025
@BentiGorlich BentiGorlich self-assigned this Feb 14, 2025
melroy89
melroy89 previously approved these changes Feb 14, 2025
@BentiGorlich
Copy link
Member Author

I think I want to make one change to this. As learned from previous inline preview changes: the link should only be rendered as inline preview if the linktext is the same as the magazine name

@melroy89 melroy89 self-requested a review February 16, 2025 13:39
@BentiGorlich
Copy link
Member Author

Ok so I moved the logic into the parsers now, where I should have put them initially. I also wrote a few tests :)

Instead of trying to fix the link generated by combination of commonmark and our parsers (the links generated by our parsers are removed because nested links are not allowed), just remove the link syntax surrounding the community- and user-mentions if the handle and domain are contained in the surrounding link.
@BentiGorlich BentiGorlich force-pushed the new/render-lemmy-community-links branch from 251a526 to 31ca955 Compare February 18, 2025 10:25
@BentiGorlich BentiGorlich enabled auto-merge (squash) February 18, 2025 14:35
@BentiGorlich BentiGorlich merged commit 81b20a3 into main Feb 18, 2025
7 checks passed
@BentiGorlich BentiGorlich deleted the new/render-lemmy-community-links branch February 18, 2025 14:48
@melroy89 melroy89 added this to the v1.8.1 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants