Fixes an issue with Vale Server's /html endpoint (errata-ai/vale-server#84).
Changelog
- e3e6da8 fix: restore
--builtfunctionality
This release introduces a new extension point, script, that allows for the creation of rules that require programming logic. The extension point uses the embedded language Tengo and is supported on all platforms.
# An example rule for suggesting a new section after 3 paragraphs of text.
extends: script
message: "Consider inserting a new section heading at this point."
link: https://tengolang.com/
# The unprocessed file contents.
#
# We need this to access heading markup.
scope: raw
script: |
text := import("text")
matches := []
p_limit := 3 // at most 3 paragraphs per section
// Remove all instances of code blocks since we don't want to count
// inter-block newlines as a new paragraph.
document := text.re_replace("(?s) *(\n```.*?```\n)", scope, "")
count := 0
for line in text.split(document, "\n") {
if text.has_prefix(line, "#") {
count = 0 // New section; reset count
} else if count > p_limit {
start := text.index(scope, line)
matches = append(matches, {begin: start, end: start + len(line)})
count = 0
} else if text.trim_space(line) == "" {
count += 1
}
}Also check out the new online Rule Explorer app.
Changelog
This release features a new extension point, metric, which is a more abstract implementation of readability:
extends: metric
message: "Try to keep the Flesch–Kincaid grade level (%s) below 8."
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
formula: |
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
condition: "> 8"It allows you to create your own summary-scoped metrics -- be it an existing readability score, an entirely custom metric, or a combination of the two. See the new Readability style for some examples.
Note: As stated in the documentation, the
readabilityextension point is now considered deprecated. Although it will continue working in future releases, we recommend the use ofmetricgoing forward.
Changelog
With this release, existence and substitution will now respect entries in accept.txt (joining capitalization, conditional, and spelling).
Changelog
00a42b7 fix: support inline comments in .aff files (#372)
814bf81 feat: allow the level of Vale.Terms to be adjusted (#373)
a7322c0 feat: support exceptions in more extension points
NOTE: The GoDownloader project has been deprecated. If you were using it in your CI workflow, we now recommend that you use the official GitHub CLI tool instead:
$ gh release download --repo 'errata-ai/vale' -p 'vale_2.11.2_Linux_64-bit.tar.gz'