You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make --ignore-multiline-regex example non-greedy #3892
I recently started using --ignore-multiline-regex:
$ codespell -h
...
--ignore-multiline-regex IGNORE_MULTILINE_REGEX
regular expression that is used to ignore text that may span
multi-line regions. The regex is run with re.DOTALL. For
example to allow skipping of regions of Python code using
begin/end comments one could use: --ignore-multiline-regex '#
codespell:ignore-begin *\n.*# codespell:ignore-end *\n'.
Defaults to empty/disabled.
I started out with this simple setup in setup.cfg:
# How to ignore blocks of code.
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
Soon I found out that the matching is greedy and that therefore in this example:
Activity