Repository navigation
Improves handling of characters - #20950
Merged
Merged
Conversation
… in general and the keyphrase density assessment in particular
mhkuu
marked this pull request as ready for review
December 15, 2023 13:37
Contributor
|
Acceptance testing: By following the testing instruction in https://github.com/Yoast/wordpress-seo-premium/pull/4167, I get the expected results. With the exception of the known (and acceptable) issues reported by Marina in this comment. We decided that this behaviour is acceptable on the note that that is behaviour would be fixed when we migrate the Paragraph length assessment to use the new HTML Parser. Additionally, there is a known issue where highlighting cannot be applied to text containing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
characters for position-based highlighting in general and the keyphrase density assessment in particular. Before this PR, if an character where to enter thePaper, it would incorrectly be parsed early into a space character, and hence be problematic when highlighting. character as we did hitherto does not work, but we resolve that when actually applying the marks in the corresponding Premium PR.Summary
This PR can be summarized in the following changelog entry:
characters would be handled incorrectly when using the highlighting feature in Elementor. to its reserved character when running the analysis and adds#nbsp;as a word delimiter. to its reserved character when running the analysis and adds#nbsp;as a word delimiter.Relevant technical choices:
to#nbsp;beforeparse5can convert it to a space, and mess up our position information.#nbsp;as a word delimiter.Markobjects when the keyphrase is separated by characters. InmergeConsecutiveAndOverlappingMarkingsfor consecutive markings, so there we need to add a special rule for . However, this method needs to be refactored anyway, this is the corresponding TD task: https://github.com/Yoast/lingo-other-tasks/issues/296Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
WordPress
Shopify
NOTE: testing in Shopify is mostly for impact check
character somewhere in the text (you can use the text editor when adding the character) characters in the first sentence of the second paragraph (it's the sentence with the transition words).paragraphs are not highlighted in Consecutive sentences and Keyphrase distribution assessments #19776Relevant test scenarios
Test instructions for QA when the code is in the RC
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:
characters in position-based highlighting (so currently only the keyphrase density assessment.UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/plugins-automated-testing/issues/1244
Fixes https://github.com/Yoast/plugins-automated-testing/issues/1247