-
We'd like to ignore spelling for exact multi-word phrases, with our use case being product names. From my testing, it appears that the For example, say there's a product name "Yellow Bananaz". We don't want "bananaz" or "Bananaz" to be allowed outside of this exact phrase. How do we configure Vale to ignore specific multi-word phrases for spelling? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You're correct that, with Vale, spell check is a single-word operation. That said, if I'm understanding correctly, there are two objectives here:
If this is indeed the case, I would create a custom extends: spelling
message: "Did you really mean '%s'?"
level: error
filters:
- '[Bb]ananaz' And then create another rule, perhaps ---
extends: substitution
message: "Use '%s' instead of '%s'"
level: error
ignorecase: false
swap:
# This will catch cases like "Blue Bananaz", "Yellow bananaz", etc.
'(?:[^\s]*) ?[Bb]ananaz': Yellow Bananaz |
Beta Was this translation helpful? Give feedback.
-
Hi @jdkato, I recommend to correct this. Regards, Roman |
Beta Was this translation helpful? Give feedback.
-
Vocabularies do support phrases (multi-word tokens). What are you trying to do exactly? |
Beta Was this translation helpful? Give feedback.
-
Hi @jdkato, |
Beta Was this translation helpful? Give feedback.
You're correct that, with Vale, spell check is a single-word operation. That said, if I'm understanding correctly, there are two objectives here:
spelling
error.If this is indeed the case, I would create a custom
spelling
-based rule that excludes the relevant parts of products names:And then create another rule, perhaps
Products.yml
, that enforces the correct use of product names: