Skip to content

Comments

fix(parser): handle multiple '!' characters in host patterns correctly (#46)#50

Merged
veeso merged 1 commit intomainfrom
fix/issue-46-pattern-parsing
Jan 31, 2026
Merged

fix(parser): handle multiple '!' characters in host patterns correctly (#46)#50
veeso merged 1 commit intomainfrom
fix/issue-46-pattern-parsing

Conversation

@veeso
Copy link
Owner

@veeso veeso commented Jan 31, 2026

Summary

  • Fixed pattern parsing to correctly handle multiple ! characters in host patterns
  • Only the leading ! character is now treated as a negation marker
  • Any subsequent ! characters are treated as literal characters in the pattern

Fixes #46

Changes

  • Replaced split('!') with strip_prefix('!') in parse_host() function
  • Added comprehensive test cases for edge cases (host!name, !host!name, !a!b!c, a!b)

Test plan

  • New test should_parse_host_with_exclamation_in_pattern covers all edge cases
  • All 152 tests pass
  • Clippy clean
  • Formatting verified

🤖 Generated with Claude Code

#46)

Only the leading '!' character indicates a negated pattern. Any subsequent
'!' characters are now treated as literal characters in the pattern.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cocogitto-bot
Copy link

cocogitto-bot bot commented Jan 31, 2026

✔️ 86aef70 - Conventional commits check succeeded.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21547287276

Details

  • 22 of 22 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 98.348%

Totals Coverage Status
Change from base Build 21547246582: 0.009%
Covered Lines: 3393
Relevant Lines: 3450

💛 - Coveralls

@veeso veeso merged commit 5db4f5a into main Jan 31, 2026
6 checks passed
@veeso veeso deleted the fix/issue-46-pattern-parsing branch January 31, 2026 16:21
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.

Pattern parsing does not handle multiple '!' characters correctly

2 participants