Skip to content

Commit

Permalink
Add word bounds to Google.Units
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Apr 26, 2023
1 parent a71417b commit da93a50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Google/Units.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extends: existence
message: "Put a nonbreaking space between the number and the unit in '%s'."
link: 'https://developers.google.com/style/units-of-measure'
link: "https://developers.google.com/style/units-of-measure"
nonword: true
level: error
tokens:
- \d+(?:B|kB|MB|GB|TB)
- \d+(?:ns|ms|s|min|h|d)
- \b\d+(?:B|kB|MB|GB|TB)
- \b\d+(?:ns|ms|s|min|h|d)
2 changes: 2 additions & 0 deletions fixtures/Units/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Cook on high for three minutes.

I have a 64GB.
I can hold my breath for 30s.

This is a sentence with B2B in it.

0 comments on commit da93a50

Please sign in to comment.