-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweaking "a/an" rule and "quotations" rule #36
base: main
Are you sure you want to change the base?
Conversation
ValeStyles/Couchbase/An.yml
Outdated
@@ -14,7 +13,7 @@ exceptions: | |||
- '[Aa] [Uu]ser' | |||
- '[Aa] [Uu]sername' | |||
- '[Aa] UI' | |||
- '[Aa] <<[BbCcDdFfGgHhJjKkLlMmNnPpQqRrSsTtVvWwXxYyZz].+>>' | |||
- '\b[Aa] [^aeiouAEIOU\s][a-zA-Z]*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for non-vowels? it wouldn't be matched by the token above, so is an odd exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I think it was just a holdout because I was running into issues with the original regex. Let me correct that...
@@ -4,8 +4,7 @@ link: https://docs.couchbase.com/styleguide/articles.html | |||
level: error | |||
|
|||
tokens: | |||
- '[Aa] \b[aAeEiIoOuU].+\b' | |||
- '[Aa] \b[Hh][Tt][Mm][Ll]\b' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is removing the "A HTML" rule intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah shit that was a mistake. One sec...
@@ -4,8 +4,7 @@ link: https://docs.couchbase.com/styleguide/articles.html | |||
level: error | |||
|
|||
tokens: | |||
- '[Aa] \b[aAeEiIoOuU].+\b' | |||
- '[Aa] \b[Hh][Tt][Mm][Ll]\b' | |||
- '\b[Aa]\s+[AEIOUaeiou]\w*\b' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Word boundary, "a", any number of spaces, a word beginning with a vowel. 👍
ValeStyles/Couchbase/Quotations.yml
Outdated
- '\x60"([^"]*)"\x60' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will now only match:
backtick + quote + any number of non-quotes, + quote + backtick?
Is that what's intended? Didn't you want .*
before and after to allow tokens before/after the quoted sections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good point. Let's add that back in, just in case.
- '[Rr]efer to\s+(xref:[^\s]+|https:\/\/[^\s]+|http:\/\/[^\s]+|<<[^>]+>>)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I snuck this one in, too, because the original wasn't working.
Scope needs to be raw
or it'll ignore the http/https links.
No description provided.