-
Notifications
You must be signed in to change notification settings - Fork 941
Open
Description
- I've read and understood the contribution guidelines.
- I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
When a subheading contains a line break and 196+ words, the subheading distribution warning occurs incorrectly.
Copied from archived repo as issue still exists. See Yoast/YoastSEO.js#2161
To Reproduce
Step-by-step reproduction instructions
- Create new post with content sample below (code view).
- Check Readability Analysis. See warning about subheading.
- Remove the word six from the paragraph above 'Section Two'. Warning goes away.
- Add the word six back. Warning appears again.
- Switch to code view
- Remove the line break from 'Section One With Line Break'. Warning goes away.
- Add line break back. Warning appears.
Expected results
No warning
Actual results
Warning appeared
Subheading distribution: 1 section of your text is longer than 300 words and is not separated by any subheadings. Add subheadings to improve readability.
Screenshots, screen recording, code snippet
Technical info
- If relevant, which editor is affected (or editors):
- Block Editor
- Classic Editor
Used versions
- Device you are using: Desktop
- Operating system: Win11
- PHP version: 8.4.5 (Supports 64bit values)
- WordPress version: 6.9
- WordPress Theme: Twenty Twenty-Three (twentytwentythree) v1.6
- Yoast SEO version: 26.5
- Classic Editor plugin version: 1.6.7 (not required; just tested to confirm it happens in both classic and block editors)