- Issue created by @prudloff
- Merge request !34Class detection inspired by https://devhints.io/xpath#class-check → (Open) created by prudloff
- 🇵🇹Portugal joao.ramos.costa
Indeed, clever than what I proposed in https://www.drupal.org/project/glossify/issues/3455743 💬 Avoid linking a specific istance of a word in content Active .
I was overcomplicating working on a ckeditor5 plugin that included a new html element to break processing and avoid glossify a given word instance, then bumped on that xPath query, and your issue.
This solves partially https://www.drupal.org/project/glossify/issues/3455743 💬 Avoid linking a specific istance of a word in content Active , as any site builder can simply leverage ckeditor styles plugin (styles dropdown) and add .glossify-exclude class on desired elements.
So, +1 for me.
Tested it and seemed working smoothly on my dev end.
- 🇩🇪Germany Anybody Porta Westfalica
Thank you very much for the nice work @prudloff and thanks for the feedback @joao.ramos.costa
I don't want to crash this party, but we please should have some test cases for these and possible edge-cases. Could someone do us that favor, please? :)
- Merge request !37Issue #3504552: Make "glossify-exclude" class detection more robust → (Merged) created by Unnamed author
- 🇵🇹Portugal joao.ramos.costa
Hi @anybody,
done at https://git.drupalcode.org/project/glossify/-/merge_requests/37 ; I couldn't push to 3504552-make-glossify-exclude-class branch, so Include both commits.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @joao.ramos.costa maybe you could also add your "styles" ckeditor pattern trick someway?
- 🇵🇹Portugal joao.ramos.costa
Yes,
possible in the README in a misc section ? Your you mean add a hook_update, that could be tricky...
- 🇩🇪Germany Anybody Porta Westfalica
@prudloff any other ideas for tests we should think about to be safe(r)?
- 🇫🇷France prudloff Lille
I think we should these cases:
<!-- Multiple classes --> Simple plain text with <span class="glossify-exclude foo bar">RT</span> as replacement term <!-- Nested markup --> <div class="glossify-exclude"> <p> Simple plain text with RT</span> as replacement term </p> </div>
These should fail without the patch and pass with it.
- 🇵🇹Portugal joao.ramos.costa
- 🇩🇪Germany Anybody Porta Westfalica
@grevil: Could you have a short look and give your feedback? Thanks!
- First commit to issue fork.
-
grevil →
committed a6611122 on 3.x authored by
joao.ramos.costa →
Issue #3504552: Make "glossify-exclude" class detection more robust
-
grevil →
committed a6611122 on 3.x authored by
joao.ramos.costa →
- 🇩🇪Germany Grevil
I published 3.0.5: https://www.drupal.org/project/glossify/releases/3.0.5 → .
Thanks everyone!
Automatically closed - issue fixed for 2 weeks with no activity.