Hashes in gathered links may contain leading newlines
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.9k
- Forks
- 191
- Avg merge
- 36m
- Merged PRs (30d)
- 12
Description
Hey Simon, all but the first hash per tool has a leading newline here:
https://github.com/simonw/tools/blob/8152f0b79eeb0007bde3e299f954e3343cc2d14d/gather_links.py#L38
The colophon page thus ends up having the HTML “broken” in the commit hash URLs because of the leading newlines, although browsers don't seem to be fazed by it. I did have an issue with these newlines in the middle of URLs, though, and ended up fixing it with a plain call to .strip():
commit_hash = raw_commit[:first_pipe].strip()
Thought you might like to know since these extra newlines might bite you later down the road.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start in gather_links.py at line 38, where raw_commit is used to obtain the commit hash. Reproduce the generated colophon links and inspect whether hashes contain leading newlines, then verify that the resulting commit-hash URLs contain no leading or embedded newline characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100