Skip to content

Commit

Permalink
Add check for multiplication symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
suchow committed Feb 7, 2016
1 parent ae4a73f commit 39c73b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions proselint/checks/butterick/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ def check_sentence_spacing(text):
text, [regex], err, msg, max_errors=3, require_padding=False)


@memoize
def check_multiplication_symbol(text):
u"""Use the multiplcation symbol ×, not the lowercase letter x."""
err = "butterick.symbols.multiplication_symbol"
msg = u"Use the multiplcation symbol ×, not the letter x."
regex = "[0-9]* x [0-9]*"

return existence_check(
text, [regex], err, msg, max_errors=3, require_padding=False)


# @memoize
# def check_en_dash_separated_names(text):
# """Use an en-dash to separate names."""
Expand Down
1 change: 1 addition & 0 deletions proselint/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ recognize, recognise, recognise, recognise

# Symbols
$1000 USD
I hit him over the head with a 2 x 4.

# Venery terms
A bunch of antelopes walked by the road.
Expand Down

0 comments on commit 39c73b8

Please sign in to comment.