Ignore camel case in heading capitalization, add double slash and double parentheses rules to Vale (#6165)

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
kolchfa-aws 2024-01-16 12:55:47 -05:00 committed by GitHub
parent 130cd222f2
commit 51ac5bdc1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 1 deletions

View File

@ -9,4 +9,5 @@ indicators:
- ")"
exceptions:
- k # ignores lowercase k-NN
- '[A-Z]{2,}' # ignores all acronyms
- '[A-Z]{2,}' # ignores all acronyms
- '([A-Z][a-z0-9]+){2,}' # ignores all camel case words

View File

@ -0,0 +1,8 @@
extends: existence
message: "Remove double slashes from the link '%s'."
level: error
nonword: true
scope: raw
tokens:
- '\[.*\](\(){2,}.*(\)){1,}'
- '\[.*\](\(){1,}.*(\)){2,}'

View File

@ -0,0 +1,7 @@
extends: existence
message: "Remove double slashes from the link '%s'."
level: error
nonword: true
scope: raw
tokens:
- '\(\{\{site.url\}\}\{\{site.baseurl\}\}.*\/{2,}.*\)'

View File

@ -32,6 +32,10 @@ This sentence tests Latin substitution through using Latin.
## This heading: Tests colons but fails capitalization
This sentence tests [links double parentheses]({{site.url}}{{site.baseurl}}/opensearch/).
This sentence tests [links double slash]({{site.url}}{{site.baseurl}}/opensearch/).
This sentence tests [links end slash]({{site.url}}{{site.baseurl}}/opensearch/).
This sentence tests [links mid slash]({{site.url}}{{site.baseurl}}/opensearch/).

View File

@ -32,6 +32,10 @@ This sentence tests Latin substitution via using Latin.
## This heading: tests colons
This sentence tests [links double parentheses](({{site.url}}{{site.baseurl}}/opensearch/)).
This sentence tests [links double slash]({{site.url}}{{site.baseurl}}/opensearch//double-slash/).
This sentence tests [links end slash]({{site.url}}{{site.baseurl}}/opensearch).
This sentence tests [links mid slash]({{site.url}}{{site.baseurl}}opensearch).

View File

@ -36,6 +36,8 @@ OpenSearch.HeadingPunctuation = YES
OpenSearch.Inclusive = YES
OpenSearch.LatinismsElimination = YES
OpenSearch.LatinismsSubstitution = YES
OpenSearch.LinksDoubleParentheses = YES
OpenSearch.LinksDoubleSlash = YES
OpenSearch.LinksEndSlash = YES
OpenSearch.LinksMidSlash = YES
OpenSearch.LoginNoun = YES