Repository navigation
Conversation
…l ones Fixes vyncint#849 Signed-off-by: Álvaro Alonso <242080768+alvaroalonsoparrondo-a11y@users.noreply.github.com>
Signed-off-by: Álvaro Alonso <242080768+alvaroalonsoparrondo-a11y@users.noreply.github.com>
vyncint
previously approved these changes
Nov 27, 2026
vyncint
left a comment
Owner
There was a problem hiding this comment.
Reviewed against the issue; CI is green. Thank you.
Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com> # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #849
Screen::parse's rustdoc and DESIGN §3 said it accepts "exactly" whatDisplayandwith_styleswrite, and that everything else is anError::Parse. It also reads every shape in the issue's right-hand column. As the issue says, the tolerances do no harm and STABILITY promises that a file from 0.10.1 on keeps parsing, so I took the first option: the docs now say what is read, and the grammar is unchanged.crates/termlens/src/screen/parse.rs: the rustdoc lists the extra shapes (a+before a number in the header, one space or none beforecursor:, a row's spans split over several lines, blank lines between span lines,(none)after spans,0-0, a token repeated or out of order, a span with no token) and says a file that parses is not proof termlens wrote it.docs/DESIGN.md§3: "Reading it back" gets the same list, without "exactly", and why the tolerances stay; "What a reader skips" points to it instead of saying "accepts exactly that".the_reader_accepts_these_shapes_beside_the_canonical_onesinparse.rsreads one input per table row (two for the header spacing) and checks that each gives the same screen as its canonical form (diffempty, samewith_styles()text).Checked on macOS:
cargo fmt --all --check,cargo clippy -p termlens --all-targets --all-features -- -D warnings,cargo test -p termlens --lib screen::parse(15 passed), theparsedoctest,check-dco.shandcheck-no-ai-attribution.sh.Álvaro Alonso
242080768+alvaroalonsoparrondo-a11y@users.noreply.github.com