Yoast / wordpress-seo

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

Sentence Length Error with Bold Text #8389

Closed frontiermarketingllc closed 6 years ago

frontiermarketingllc commented 6 years ago

Please give us a description of what happened.

When using the Yoast plug-in to measure readability, I noticed that when I used the eye icon next to the score for sentence length, it would highlight all the bold sentences along with the sentences that come directly before. So, it seems that when a sentence is bolded, the plug-in thinks it's part of the sentence before it, artificially inflating the words-per-sentence and making those scores unusable as long as there's bolded text.

Please describe what you expected to happen and why.

I expected the plug-in to only highlight sentences longer than 20 words, since that's what that score is measuring.

How can we reproduce this behavior?

  1. Open a new post in WordPress and type two sentences between 10 and 20 words each. Toggle the readability tab in the Yoast plug-in below, and note the scores. yoast-bug-1

  2. Make the second sentence bold, and note how the scores change. yoast-bug-2

  3. Click the eye icon to the right of the score for sentences longer than 20 words. Note that it highlights both sentences, considering them one sentence. yoast-bug-3

Technical info

CarolineGeven commented 6 years ago

Thanks for reporting this issue. I've been able to confirm this bug.

There is already a bug report for this, which can be found here: https://github.com/Yoast/YoastSEO.js/issues/1291. I'm closing this as this is a duplicate of https://github.com/Yoast/YoastSEO.js/issues/1291. Thanks for your understanding!