We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed6aca2 commit f4742c6Copy full SHA for f4742c6
proselint/checks/misc/but.py
@@ -23,15 +23,20 @@
23
24
25
def _check_but_paragraphs(text: str, check: Check) -> Iterator[CheckResult]:
26
- for m in re.finditer(PATTERN, text):
27
- count = m.group(0).count("\n", 0, 2)
28
- yield CheckResult(
29
- start_pos=m.start() + count + check.offset[0],
+ return (
+ CheckResult(
+ start_pos=(
+ m.start()
30
+ + m.group(0).count("\n", 0, 2)
31
+ + check.offset[0]
32
+ ),
33
end_pos=m.end(),
34
check_path=check.path,
35
message=check.message,
36
replacements=None,
37
)
38
+ for m in re.finditer(PATTERN, text)
39
+ )
40
41
42
check = Check(
0 commit comments