mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-06-29 06:00:45 +00:00
Add remove-em-dash hook
New fixer hook that replaces UTF-8 em-dashes (U+2014) with a plain hyphen (-), modeled on the trailing-whitespace hook. - pre_commit_hooks/remove_em_dash.py: the fixer (binary-safe, UTF-8 only) - tests/remove_em_dash_test.py: full coverage of fix and no-op cases - registered in setup.cfg, .pre-commit-hooks.yaml, and README.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
fa6b006f0e
commit
aba8a7597a
5 changed files with 84 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ console_scripts =
|
|||
no-commit-to-branch = pre_commit_hooks.no_commit_to_branch:main
|
||||
pre-commit-hooks-removed = pre_commit_hooks.removed:main
|
||||
pretty-format-json = pre_commit_hooks.pretty_format_json:main
|
||||
remove-em-dash = pre_commit_hooks.remove_em_dash:main
|
||||
requirements-txt-fixer = pre_commit_hooks.requirements_txt_fixer:main
|
||||
sort-simple-yaml = pre_commit_hooks.sort_simple_yaml:main
|
||||
trailing-whitespace-fixer = pre_commit_hooks.trailing_whitespace_fixer:main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue