Skip to content

fix: correct CSV sum regex to use \d instead of [\\d]#368

Open
nanaubusiness wants to merge 2 commits into
DietrichGebert:mainfrom
nanaubusiness:fix/correctness-regex-digit-check
Open

fix: correct CSV sum regex to use \d instead of [\\d]#368
nanaubusiness wants to merge 2 commits into
DietrichGebert:mainfrom
nanaubusiness:fix/correctness-regex-digit-check

Conversation

@nanaubusiness

Copy link
Copy Markdown

In benchmarks/correctness.js, the character class [\\d] in a Python raw string matches a literal backslash or 'd', not a digit. The intended lookbehind/lookahead (?<!\d) and (?!\d) now work correctly to detect the standalone number 351 in CSV sum output.

Closes #365

Admin added 2 commits June 27, 2026 19:52
Previously '/ponytail:review' fell to getDefaultMode() instead of
activating review mode, because the condition checked for the
unreachable '/ponytail:ponytail-review' (wrong pattern). Also removes
the unreachable disjunct that could never be matched.

Closes DietrichGebert#361
In correctness.js, [\\d] in a raw string creates a character class
matching a literal backslash or 'd', not a digit. The intended
lookbehind/lookahead (?<!\d) and (?!\d) now work correctly.

Closes DietrichGebert#365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

benchmarks/correctness.js: regex [\\d] matches literal backslash/d not digit

1 participant