Skip to content

Fixes processing of hyphens at start and end positions#21995

Merged
FAMarfuaty merged 1 commit intorelease/24.4from
fix/hyphens-start-end
Jan 27, 2025
Merged

Fixes processing of hyphens at start and end positions#21995
FAMarfuaty merged 1 commit intorelease/24.4from
fix/hyphens-start-end

Conversation

@mhkuu
Copy link
Copy Markdown
Contributor

@mhkuu mhkuu commented Jan 27, 2025

Context

  • We want to fix a bug where using hyphens at the start or end of a sentence would cripple the content analysis.

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where using hyphens at the start or end of a sentence would cripple the content analysis when editing a post.

Relevant technical choices:

  • None.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • This change primarily effects the sentence length assessment, but it's an edge case.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #21994

@mhkuu mhkuu added changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog Shopify This PR impacts Shopify. labels Jan 27, 2025
@mhkuu mhkuu added this to the 24.4 milestone Jan 27, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build e69bcd469d808d5290bce9b76fa3ea1da3fea87c

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 54.606%

Totals Coverage Status
Change from base Build 0031b1b85c60d127dcd458cbd89a54d3099c9afe: 0.005%
Covered Lines: 30086
Relevant Lines: 55466

💛 - Coveralls

@mhkuu mhkuu linked an issue Jan 27, 2025 that may be closed by this pull request
10 tasks
@mhkuu mhkuu marked this pull request as ready for review January 27, 2025 09:13
Copy link
Copy Markdown
Contributor

@FAMarfuaty FAMarfuaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good! Clean solution ✨

@FAMarfuaty
Copy link
Copy Markdown
Contributor

Acceptance test: works as expected. Additionally, I also tested the AI Optimize for sentence length assessment and it worked nicely 🎉

@FAMarfuaty FAMarfuaty merged commit 6eb7ad4 into release/24.4 Jan 27, 2025
@FAMarfuaty FAMarfuaty deleted the fix/hyphens-start-end branch January 27, 2025 10:24
@sannevndrmeulen sannevndrmeulen removed the Shopify This PR impacts Shopify. label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text contains 0 words or Not enough content when paragraph leads with a dash

4 participants