You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
Maecenas apple a auctor mi. Etiam sapien nulla, eleifend quis convallis sed, sodales vel felis. Vestibulum ante psum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
apple
Fusce malesuada lectus bi sit ametapple cursus iaculis. Donec sit amet dignissim lectus. Aenean at ante quis quam eleifend volutpat vitae quis nulla. Vestibulum ultrices lectus nec lacus pulvappleinar lobortis. Pellentesque vehicula nulla eu interdum blandit. Curabitur eleifend nulla leo. Aliquam vehicula lacus id orci euismod, non rhoncus lacus cursus. Fusce vitae arcu quis felis ornare sagittis. Proin ultricies purus et molestie. Maecenas apple a auctor mi. Etiam sapien nulla, eleifend quis convallis sed, sodales vel felis. Vestibulum ante psum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
Fill in keyword "apple".
Check assessment:
Toggle eye marker:
It is expected to see only word "apple" being highlighted 3 times.
The text was updated successfully, but these errors were encountered:
Interesting fact: the spurious highlights only occur when there is a heading apple. If I remove the heading or I make it apple bla bla or Apple, only correct instances of the keyphrase are highlighted.
The current mechanism of highlighting keyphrases is as follows.
Search for all possible ways the words from the keyphrase occur in the text. In this example, this step will result in just apple.
Take sentences one by one and hang highlight-tags on words from the keyphrase in them. In this example, this step will result in
[
"Maecenas <yoastmark class='yoast-text-mark'>apple</yoastmark> a auctor mi.",
"<yoastmark class='yoast-text-mark'>apple</yoastmark>",
"Maecenas <yoastmark class='yoast-text-mark'>apple</yoastmark> a auctor mi."
]
Mark any instances of these sentences in the text. This is the moment when it goes wrong: The word "ametapple" is considered to include the sentence "<yoastmark class='yoast-text-mark'>apple</yoastmark>".
How bad is that?
The problem occurs if the following two conditions are fulfilled:
There exists a sentence with keyphrase words in the text.
There exists a word in the text that includes this sentence entirely (case-sensitive).
It's hard to believe that this happens with a regular text. However, if the keyphrase includes somewhat shorter (non-function) words and if one / some of these words are used alone in a sentence (for instance, in a heading), there is a risk of a problem demonstrated by the issue.
We at Team Lingo believe it's an edge case, which is unlikely to bother a lot of users and which can wait for the new Tree Parser to solve it. @moorscode do you agree?
Tested with WP 5.0.3 and 10.1 beta2.
How can we reproduce this behavior?
It is expected to see only word "apple" being highlighted 3 times.
The text was updated successfully, but these errors were encountered: