Skip to content

feat: add capture::basic_formatted_to_plain_indexed - #38

Merged
taylordotfish merged 3 commits into
mainfrom
taylordotfish/basic-formatted-to-plain-indexed
Sep 5, 2026
Merged

taylordotfish merged 3 commits into
mainfrom
taylordotfish/basic-formatted-to-plain-indexed

Conversation

@taylordotfish

Copy link
Copy Markdown
Member

Add capture::basic_formatted_to_plain_indexed, which is like capture::basic_formatted_to_plain, but also includes the original index of each plain text substring.

Example

use vt100::capture::basic_formatted_to_plain_indexed;
let mut iter = basic_formatted_to_plain_indexed("hello\x1b[31;1mworld");
assert_eq!(iter.next(), Some((0, "hello")));
assert_eq!(iter.next(), Some((12, "world")));
assert_eq!(iter.next(), None);

@greptile-apps

greptile-apps Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Greptile Summary

Adds basic_formatted_to_plain_indexed, reuses it for the existing plain-text iterator, and documents that returned offsets are byte indices.

Confidence Score: 5/5

The PR appears safe to merge.

The changes since the previous review correctly clarify that offsets are byte indices, and no actionable regression or outstanding rule violation remains.

Important Files Changed

Filename Overview
src/capture.rs Adds the indexed iterator and clarifies its byte-index contract.
Cargo.toml Advances the development package version to 0.19.1-dev.
CHANGELOG.md Documents the new capture API for the upcoming release.

Reviews (2): Last reviewed commit: "Clarify doc" | Re-trigger Greptile

@taylordotfish
taylordotfish merged commit 4087782 into main Sep 5, 2026
11 checks passed
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.

1 participant