- Issue created by @Anybody
- ๐ฎ๐ณIndia vinodhini.e chennai
vinodhini.e โ made their first commit to this issueโs fork.
- First commit to issue fork.
- @grevil opened merge request.
- ๐ฉ๐ชGermany Grevil
Ok this should do the trick! The problem was, that we use a word boundary at the end of the regex pattern ("/b"). Since "+" isn't considered a word character, the pattern can not match Abc Xyz+.
Drupal probably also allows entities to be named "+Abc Xyz" as well? I guess that will also fail because of the leading "/b". I will provide a test and a fix tommorow.
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Thanks @grevil. We have to be careful then, because maybe the change will lead to issues where partial words are replaced, which might be undeserved. Maybe we'll need a setting, if we don''t find a good general solution. Thanks for finding out the reason so far!
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Maybe we should first add an issue to add tests for not breaking partial words. After merging that and updating the fork, I guess they will fail expectedly.
- ๐ฉ๐ชGermany Grevil
Now that ๐ Add tests to check, that words partially containing an entity name won't get glossified Active is fixed, let's see if the tests still succeed.
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Nice! So let's add the 4-options select option for "Partial word match":
- Only match whole words (default)
- Match partially at end of words
- Match partially at beginning of words
- Match partially anywhere
- ๐ฉ๐ชGermany Grevil
Nice! So let's add the 4-options select option for "Partial word match":
Only match whole words (default)
Match partially at end of words
Match partially at beginning of words
Match partially anywhereI don't think, that is related to this issue, but we can create a follow-up issue for that in the future.
- ๐ฉ๐ชGermany Grevil
The current approach should be the option we have to fix this issue.
It will have problems with terms like " test ", "test." or "test," but I don't think it is even possible to save drupal entities having a label with a trailing whitespace? And using "." or "," inside the label is also super uncommon and would have let to a problem before.
- ๐ฉ๐ชGermany Grevil
Regarding the many tests we have, this fix is fairly "save". I'll merge it.
-
grevil โ
committed 49d78a5d on 3.x
Issue #3538523: "Abc Xyz+" does not get replaced
-
grevil โ
committed 49d78a5d on 3.x
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.