Closed tsmith123 closed 3 weeks ago
We didn't want to change the behavior of [something](/items/423)
to display as #423
in this one. Otherwise, this is good. Note to self, that function is getting pretty gnarly.
Ah, didn't consider that scenario. Yeah the function is getting messy and difficult to make changes without breaking something. Really need unit tests so when someone with little experience of the codebase makes changes they can be sure they haven't broken something.
I can start adding some unit tests around the codebase if that's any help?
@ekzyis and I have been discussing tests more, trying to figure out where they're good, where they're bad. We should have a public discussion at some point about it, but until then let's hold off.
Fixes #1213
Description
This PR ensures a popover is seen for internal links that include a text part.
Tests
These links were tested and are working as expected:
http://localhost:3000/items/459356
[link](http://localhost:3000/items/458213
[link](https://stacker.news)
https://stacker.news
[link](http://localhost:3000/settings)
[link](/settings)
Screenshots
Preview![Screenshot 2024-06-03 at 07 47 26](https://github.com/stackernews/stacker.news/assets/7639854/7aa74024-2691-46e1-80f0-4bb6d217db96)
Popover visible on second link![Screenshot 2024-06-03 at 07 47 34](https://github.com/stackernews/stacker.news/assets/7639854/fdb6cd10-a1c2-4f92-b91e-ee8dbc4b5dd9)