:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
This release adds support for including the observed count of occurrence
-based rules:
message: "Topic titles should use fewer than 70 characters (found: %s)."
The use of %s
is optional.
occurrence
This release adds support for including the expected form in the message
field of capitalization
-based rules:
message: "Found: '%s'; expected: '%s'."
As with substitution
, the second %s
is optional.
StylesPath
is created with sync
(https://github.com/errata-ai/vale/issues/788)message
utf8.RuneCountInString
for offsets (https://github.com/errata-ai/vale/issues/785#issuecomment-1979502308)getNativeConfig
is consistent (#780)This release introduces the ability to write custom, script-based actions, allowing you to create dynamic solutions to your rules using the Tengo scripting language:
text := import("text")
// `match` is provided by Vale and represents the rule's matched text.
made := text.re_replace(`([A-Z]\w+)([A-Z]\w+)`, match, `$1-$2`)
made = text.replace(made, "-", "_", 1)
made = text.to_lower(made)
suggestions := [made]
prefix
for capitalization
rulesThe capitalization
extension point now supports a prefix
key, allowing you to specify a constant prefix to ignore when checking the case of a scope:
extends: capitalization
message: "'%s' should be sentence-cased"
level: warning
scope: heading
match: $sentence
# sentence-cased, but allows for a common prefix:
#
# E.g.,
#
# a. This is my heading
prefix: '^[a-z]\.\s'
script
-based rules to use local filesprefix
key in capitalization
--no-global
Vale now has support for a VALE_STYLES_PATH
environment variable to set the default StylesPath
. You can also use the new vale ls-vars
command to inspect the supported environment variables from the command line.
ls-vars
commandVALE_STYLES_PATH
(#755)