Skip to content

Best way to ignore spelling for multi-word phrases? #385

Answered by jdkato
cjcarpen asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. You don't want "Bananaz" to raise a spelling error.
  2. You do want something like "Blue Bananaz" (essentially, anything that isn't exactly "Yellow Bananaz") to raise a style error.

If this is indeed the case, I would create a custom spelling-based rule that excludes the relevant parts of products names:

extends: spelling
message: "Did you really mean '%s'?"
level: error
filters:
  - '[Bb]ananaz'

And then create another rule, perhaps Products.yml, that enforces the correct use of product names:

---
extends: substitution
message: "Use '%s' instead …

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jdkato
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@r4fterman
Comment options

@jdkato
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants