Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sarahlwelton
Copy link
Contributor

No description provided.

@@ -14,7 +13,7 @@ exceptions:
- '[Aa] [Uu]ser'
- '[Aa] [Uu]sername'
- '[Aa] UI'
- '[Aa] <<[BbCcDdFfGgHhJjKkLlMmNnPpQqRrSsTtVvWwXxYyZz].+>>'
- '\b[Aa] [^aeiouAEIOU\s][a-zA-Z]*'
Copy link
Collaborator

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?

Copy link
Contributor Author

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'
Copy link
Collaborator

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?

Copy link
Contributor Author

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'
Copy link
Collaborator

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. 👍

- '\x60"([^"]*)"\x60'
Copy link
Collaborator

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?

Copy link
Contributor Author

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]+|<<[^>]+>>)'
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants