Yoast / YoastSEO.js

Analyze content on a page and give SEO feedback as well as render a snippet preview.
GNU General Public License v3.0
403 stars 170 forks source link

Shortcode not stripped/skipped when they are in first paragraph position #1064

Open CarolineGeven opened 7 years ago

CarolineGeven commented 7 years ago

What did you expect to happen?

Shortcodes would be skipped if they were in the first paragraph position.

What happened instead?

They were not. Yoast throws out "Bad SEO scoreThe focus keyword doesn't appear in the first paragraph of the copy. Make sure the topic is clear immediately." Copied from https://github.com/Yoast/wordpress-seo/issues/6554

How can we reproduce this behavior?

1.Add some text 2.Add a focus keyword 3.Place focus keyword in first paragraph

1

4.See that Yoast picks it up

2

5.Add shortcode in front of focus keyword so that both are in first paragraph position.

3

6.See that Yoast picks it up

2

7.Add a space.

5

8.See that Yoast does not skip the shortcode and is unable to locate focus keyword.

7

Can you provide a link to a page which shows this issue? n/a

Technical info

CarolineGeven commented 7 years ago

Additional information: YoastSEO.app.paper.getText(); returns



Lorem ipsum"```
We should strip all blank lines.
CarolineGeven commented 7 years ago

Please inform the customer of conversation # 123361 when this conversation has been closed.

terw-dan commented 7 years ago

When fixing this issue please use branch: https://github.com/Yoast/YoastSEO.js/tree/issue1064-firstparagraph-match

mmikhan commented 5 years ago

Please inform the customer of conversation # 450218 when this conversation has been closed.

mmikhan commented 5 years ago

Please inform the customer of conversation # 452828 when this conversation has been closed.

Pcosta88 commented 5 years ago

This issue may affect pagebuilders like WPBakery.

Users may put modules in the first paragraph position like Title Modules. Those Title Module Shortcodes appear in the first paragraph position and Yoast is unable to skip those.

Modules in first paragraph position

1

Keyword not found

screen shot 2018-12-31 at 9 05 34 am

Pcosta88 commented 5 years ago

Please inform the customer of conversation # 458836 when this conversation has been closed.

Pcosta88 commented 5 years ago

Please inform the customer of conversation # 461137 when this conversation has been closed.

mayada-ibrahim commented 5 years ago

Please inform the customer of conversation # 510559 when this conversation has been closed.

mayada-ibrahim commented 5 years ago

Please inform the customer of conversation # 529085 when this conversation has been closed.