Automattic / Automattic/harper

Harper presumably does not recognize HTML newlines as spaces in certain lints

Open
#3,259 3 comments 0 reactions 0 assignees View on GitHub
bug harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

**What got flagged?**
```html


People who encounter this form of fate are sent to
purgatory, forced to dwell on old debts and mistakes
forever.


```
Harper error:
`Use 'too' here to mean ‘also’ or an excessive degree. (Harper ToTwoToo)`
(in relation to '...sent to / purgatory')

**Why is this incorrect?**
Harper lints should recognize when HTML line breaks are replaced by spaces (e.g. whenever text isn't wrapped in a `

` tag

Contributor guide

Open the contributing guide

Research direction

Reproduce the Harper ToTwoToo warning with the provided HTML snippet, then inspect the HTML linting and whitespace-handling entry points. The fix is done when line breaks in ordinary HTML text are treated as spaces, while text inside

 remains unchanged and the reported lint is no longer triggered incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.