linebender / linebender/piet

Incorrect expectations for trailing whitespace

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

text
Dominant language
Rust
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

expanding on https://github.com/linebender/piet/issues/409#issuecomment-791806965:

I have been misunderstanding the intention of the "trailing whitespace" metric. This should not be about counting any and all whitespace at the end of a line, but rather the range of trailing whitespace that is not relevant for layout. A good heuristic for this is "whitespace the absence of which would not change the drawing of a selection that spans multiple lines".

For our purposes, this should also always include the trailing newline.

I think it's probably worth getting this in for the next piet release, which should be quite imminent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; begin by locating the implementation and expectations for the “trailing whitespace” metric in piet. Confirm that layout-irrelevant trailing whitespace includes the trailing newline and that removing it does not change drawing for a selection spanning multiple lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.