From 3644e18d26b655325d807e407b36dfc65b4510b8 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:45:28 +0100 Subject: [PATCH] Allow multiple spaces before codespell:ignore (#3653) --- codespell_lib/_codespell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index 8051391386..dee6a63ee8 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -60,7 +60,7 @@ uri_regex_def = ( r"(\b(?:https?|[ts]?ftp|file|git|smb)://[^\s]+(?=$|\s)|\b[\w.%+-]+@[\w.-]+\b)" ) -inline_ignore_regex = re.compile(r"[^\w\s]\s?codespell:ignore\b(\s+(?P[\w,]*))?") +inline_ignore_regex = re.compile(r"[^\w\s]\s*codespell:ignore\b(\s+(?P[\w,]*))?") USAGE = """ \t%prog [OPTIONS] [file1 file2 ... fileN] """