Skip to content

Commit 844a5d3

Browse files
committed
_matches_when: consistently use stripped comparisons
1 parent 8e54542 commit 844a5d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cedarscript_editor/case_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def _matches_when(line: str, when: CaseWhen, indent_level: int, line_num: int) -
7676
return True
7777
if when.regex and when.regex.search(stripped):
7878
return True
79-
if when.prefix and stripped.startswith(when.prefix):
79+
if when.prefix and stripped.startswith(when.prefix.strip()):
8080
return True
81-
if when.suffix and stripped.endswith(when.suffix):
81+
if when.suffix and stripped.endswith(when.suffix.strip()):
8282
return True
8383
if when.indent_level is not None and indent_level == when.indent_level:
8484
return True

0 commit comments

Comments
 (0)