Automattic / Automattic/harper

`havent` (missing apostrophe) produces nonsensical "ha vent" suggestion

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

Description

**Describe the bug**
When linting plaintext containing `havent` (missing apostrophe in `haven't`), Harper correctly identifies it as an unknown word and triggers a `Typo` lint, but the `SplitWords` rule splits it into two valid words: `ha` + `vent`. The only suggestion produced is `"ha vent"`, which is nonsensical. The expected behavior is either a correction to `haven't` or at least a more useful suggestion.

**To Reproduce**
1. Lint the text: `they havent reviewed it yet.`
2. Observe the lints returned.
3. Harper reports `havent` as a typo with the sole suggestion `"ha vent"`.

**Expected behavior**
The suggestion should be `haven't` (restoring the missing apostrophe), consistent with how Harper handles similar cases like `didnt` → `didn't`

**Screenshots**
N/A — lint output is programmatic.

**Platform**
Affects all platforms consuming `harper.js` or `harper-wasm`, since this is a core dictionary/rule gap.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the lint for `they havent reviewed it yet.` and compare its output with the documented `didnt` → `didn't` behavior across the core checker and the harper.js or harper-wasm consumers. Done means the missing-apostrophe form produces `haven't` or another useful suggestion instead of only `ha vent`.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.