Excluding specific XML elements from word count in Vale
Posted: Mon Oct 13, 2025 2:42 pm
Hello,
I'm working on some Vale rules to use with the terminology plugin to check terminology and other style guidelines.
I'm wondering if there's a way to exclude certain elements (like uicontrol or xref) when counting words within a sentence (or to count them as a single word regardless of their length).
So far, I only have a rule that counts all words, no matter which elements they’re in:
Is this even possible to achieve with Vale or the terminology plugin?
Thank you.
I'm working on some Vale rules to use with the terminology plugin to check terminology and other style guidelines.
I'm wondering if there's a way to exclude certain elements (like uicontrol or xref) when counting words within a sentence (or to count them as a single word regardless of their length).
So far, I only have a rule that counts all words, no matter which elements they’re in:
Code: Select all
extends: occurrence
message: "sentence too long"
scope: sentence
level: suggestion
max: 25
token: \b(\w+)\b
Thank you.