pycontribs / pycontribs/ansi2html

Carriage return ignored/treated like line feed

Open
#79 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
425
Forks
85
Avg merge
7h 49m
Merged PRs (30d)
12

Description

I ran across this processing the output from pytest. Its collection phase prints several messages, separating by carriage returns (0D). In the terminal, each of these lines overwrites the previous one, until it gets to the end of the phase, and then in does a line feed (0A). As a result, only the final line is visible. (I believe this only completely works because the lines are padded with spaces.)

When I feed this to ansi2html, every line is visible, as if they were all separated with line feeds.

I started this bug report all gung-ho about "We should fix it, I'll try to submit a pull request" but now that I more fully understand what's going on, I think the prudent thing would be to just document this behavior.

Edit: I talked to someone else, and actually, this might be doable. I'll try to hack something over the weekend.

Contributor guide

No contributing guide indexed for this repository

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

No file or test is named. Reproduce the pytest collection output with ansi2html, then inspect how carriage returns are handled compared with line feeds. Done means either preserving terminal-style carriage-return behavior or documenting the confirmed behavior, depending on the project’s decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.