errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.52k stars 155 forks source link

Words separated by spaces in exceptions list still being flagged as errors #786

Closed dgomezg closed 8 months ago

dgomezg commented 9 months ago

Check for existing issues

Environment

OS: macOS, Linux Install Method: Homebrew, direct download. Vale version: 3.2.2 (any version since v2.29.3)

Describe the bug / provide steps to reproduce it

We have a rule to ensure sentence-style capitalization of titles of type >= h2, but there are some "Product /tecnology names" that should keep the first letter capitalized, so we have those in an exception list:

extends: capitalization
message: "'%s' should use sentence-style capitalization."
level: error
scope:
  - heading.h2
  - heading.h3
  - heading.h4
  - heading.h5
  - heading.h6
match: $sentence
indicators:
  - ':'
exceptions:
  - Azure
  - Axon
  - Axon Framework
  - Axon Server
  - Axon Synapse
  - AxonIQ
  - AxonIQ Cloud
  - AxonIQ Console
  - AxonIQ Library
  - CLI
  - Code
  - Command-Query Responsibility Separation
  - Cosmos
  - Docker
  - Docker Compose

The problem is, for example, that Docker Compose or Axon Framework will still be detected as an error:

 build/site/synapse_ref/v0.9/configuration.html
 306:88  error  'Axon Server connection' should use sentence-style capitalization.

This was working properly up to v2.29.2