Fix grammar bracket detection: split on spaces too, not just slashes
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 25s
CI / test-python-klausur (push) Failing after 1m48s
CI / test-python-agent-core (push) Successful in 16s
CI / test-nodejs-website (push) Successful in 15s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 25s
CI / test-python-klausur (push) Failing after 1m48s
CI / test-python-agent-core (push) Successful in 16s
CI / test-nodejs-website (push) Successful in 15s
_is_grammar_bracket_content now splits "no pl" into ["no", "pl"] instead of treating it as single token "no pl". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -907,8 +907,9 @@ def _is_grammar_bracket_content(content: str) -> bool:
|
||||
if not content:
|
||||
return False
|
||||
|
||||
# Split on / for patterns like (about/of), (on/with)
|
||||
tokens = [t.strip().lower() for t in content.split('/') if t.strip()]
|
||||
# Split on / and spaces for patterns like (about/of), (no pl)
|
||||
tokens = re.split(r'[/\s]+', content.strip().lower())
|
||||
tokens = [t for t in tokens if t]
|
||||
if not tokens:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user