`StripStr` doesn't appear to maintain state across calls to `strip_next`.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start at anstream's StripStr::strip_next entry point and reproduce the two-call sequence with "\x1b[" followed by "38;", consuming each iterator. Compare its state and output with StripBytes; done means StripStr preserves the incomplete escape state and strips the continuation consistently, with coverage for this sequence.
Written by the indexing model from the issue text.
Description
When I pass "\x1b[" to anstream's StripStr::strip_next (and consume the iterator) , then call it again with "38;", the "38;" is not stripped as I would expect but is returned from the iterator. Printing out the StripStr shows that it is in the Ground state after the first call.
When I use StripBytes instead, the "38;" is stripped as I expected.
- Dominant language
- HTML
- Stars
- 171
- Forks
- 44
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-cli/anstyle
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
A-stream C-bug S-triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
All issues in rust-cli/anstyle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
bug cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100