You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding some negative lookahead / lookbehind should clear up some of these issues. If you've got a lot of this happening, would you be able to show some more examples so we can try and address them all?
You can run against this rule specifically with vale --filter '.Name=="Canonical.000-Repeated-words"'.
So upon investigation and running some tests in Vale studio, it seems like the logic built into the repetition extension point might be broken. Not that I know much Golang, but this line seems like it's designed to catch repeated terms across multiple lines - but it doesn't seem to be functioning.
It seems that the repetition rule turns the token into a capture group after the rule is implemented and runs against the captured content, so we can't implement negative lookahead/behind in the logic for a repetition based rule.
However, we can use the general existence extension to implement our own logic for this rule.
extends: existence
message: "Repeated words '%s'!"
level: error
ignorecase: true
tokens:
- '([\S]+)( |\n)\1'
This should only provide output in the case of two words (capitalised or not) separated by either a space or a new line.
Particularly with web pages
e.g.
<a href="something/plop">Plop</a>
will trigger this ruleThe text was updated successfully, but these errors were encountered: