Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.78k stars 895 forks source link

When there is a link in a sentence the markings are not applied #19685

Closed mmikhan closed 1 year ago

mmikhan commented 1 year ago

Reporter: @moorscode From: https://yoast.atlassian.net/browse/IM-1748 Discussion: Head over at Slack

Please give us a description of what happened

According to @manuelaugustin, there is a long-standing issue with the highlights and links (and other html content). If I try to reproduce this in Wordpress in the block editor, I get the exact same result (i.e. it’s not working). So the Shopify behavior isn’t a regression compared to the WP behavior. Therefore I’d say it’s not a fix-before-release, since it's not a Shopify problem, but a general problem in our analysis.

To Reproduce

Step-by-step reproduction instructions

  1. Create some copy
    
    Fruit and chips. Those are two words that seem worlds apart. One is healthy, you can eat it almost as much as you want, and even your doctor recommends it. Guess which one that is? We're talking about the fruit, of course. The other one (hint: chips) is a snack that people say you should rarely eat. It often comes with warnings like, eat in moderation, do it occasionally, as a treat. That's bad news because it tastes so good! 

So, we set out to find balance in the world. We wanted to create something healthy, like fruit. But, we also wanted it to quench the cravings for foods like chips. And we did it! We created the fruit chips! It's chips, but made of fruit!

How do we make the chips and what do they taste like?

How are fruit chips even made? Do we make some fruit paste and then bake it at super high temperatures? No, quite the opposite, actually. It's not even very complicated. All we do is pick the best fruits at the prime of their ripeness and at the peak of their season. We then slice them very thinly with our specialized tools. Finally, we put them in a dehydrator to remove the juice and get the crunch. That's it! We are quite determined to let the fruit be the star. So we don't add any additives, and we certainly don't add any sugars. We work with local farmers to get the freshest, seasonal fruits. By buying locally, we also reduce our carbon footprint.

So, how does that taste? When you eat our chips, you'll get the crunch of chips, coupled with the delicious, fragrant flavors of fruit. Your senses and your brain will be confused, but your tastebuds will be overjoyed!

Each bag is packed with a variety of flavors (fruits):

Strawberry Apple Pineapple Banana Pear Kiwi


2. Add a focus keyhprase "fruit chips"
3. Click the Keyphrase density marking - see the markings appearing
4. Add a link to any word in a sentence where markings appear (disable markings first)
5. Enable the markings again; see the markings from the sentence you've adjust to not appear
mhkuu commented 1 year ago

This might have been resolved through #19477 😄

hdvos commented 1 year ago

This might have been resolved through https://github.com/Yoast/wordpress-seo/issues/19477 😄

I think so as well. But better safe then sorry.

hdvos commented 1 year ago

Could not reproduce on release/20.1

https://user-images.githubusercontent.com/26040749/215050617-fa138532-9682-43d4-a454-12e8a0e35677.mov