Skip to content

Commit

Permalink
Remove the grave accent (`) from the default word regex
Browse files Browse the repository at this point in the history
Catching typos that contain a grave accent (`) is a niche. I bet we miss
more typos in Markdown files than we detect typos containing a grave
accent (`).
  • Loading branch information
DimitriPapadopoulos committed Jul 28, 2023
1 parent 2eeb8b9 commit e494748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# autogenerated by setuptools_scm
from ._version import __version__ as VERSION # type: ignore # noqa: N812

word_regex_def = "[\\w\\-'’`]+"
word_regex_def = r"[\w\-'’]+"
# While we want to treat characters like ( or " as okay for a starting break,
# these may occur unescaped in URIs, and so we are more restrictive on the
# endpoint. Emails are more restrictive, so the endpoint remains flexible.
Expand Down
6 changes: 4 additions & 2 deletions codespell_lib/data/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11479,8 +11479,9 @@ cought->caught, cough, fought,
coul->could
could'nt->couldn't
could't->couldn't
coulden't->couldn't
couldent->couldn't
coulden`t->couldn't
couldent->couldnt
couldn->could, couldn't,
couldn;t->couldn't
couldnt'->couldn't
Expand Down Expand Up @@ -47403,8 +47404,9 @@ woudl->would
woudn't->wouldn't
would'nt->wouldn't
would't->wouldn't
woulden't->wouldn't
wouldent->wouldn't
woulden`t->wouldn't
wouldent->wouldnt
wouldn;t->wouldn't
wouldnt'->wouldn't
wouldnt->wouldn't
Expand Down

0 comments on commit e494748

Please sign in to comment.