Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview cards mangle link highlighting if there's a link inside the preview text #82

Open
Jefficus opened this issue Mar 5, 2025 · 0 comments

Comments

@Jefficus
Copy link

Jefficus commented Mar 5, 2025

I frequently include a link to other articles or web sites as part of the context in my article preview blurbs, but when I display them in LB's preview cards, the links don't display correctly.

Image

In this example image, the word "None" is a link to a different article, but notice how the entire phrase "Similar to the None" has been highlighted. Then when I hover over the word "Similar", for example, the highlighting corrects itself, but the word SImilar IS actually part of the outer link, so it incorrectly indicates that nothing will happen if I click here. Very confusing.

This is happening because the post_preview_* partials all wrap the entire preview inside an anchor tag. So when the preview text link comes along, it's a nested link and that confuses the CSS.

I fixed it by removing the wrapper link and individually wrapping the title and the ReadMore-> links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant