Automattic / Automattic/harper

Typst Apostrophe Miss-interpretation

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

Description

**Describe the bug**
Harper miss-parses aposthrophes in typst under specific circumstances.

**To Reproduce**
Minimal reproduction typst document:
```typst
#align(center)[isn't]
```

'Isn't' is then split around the ', causing a false positive.

**Expected behavior**
Don't break up the word, and thus don't flag it as a spelling error.

**Screenshots**

Image

Output of `harper-cli spans`, seems to quite clearly incorrectly interpret the single quote as a code symbol or such?

**Platform**
`harper-cli` and `harper-ls`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the minimal Typst document with `harper-cli spans`, then compare the behavior in `harper-ls`. Trace how the apostrophe in `isn't` is interpreted under `#align(center)[...]`; done means the word is kept intact and is no longer reported as a spelling error in both entry points.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.