Automattic / Automattic/harper
Feature: Allow words containing dashes (`-`) and spaces (` `) in the custom dictionary.
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
**What problem does this solve?**
Currently, in order to have e.g. the name of a place that contains dashes in its name, you have to put each of its pieces in the custom dictionary.
This is also applicable for spaces, like in the case of `Messerschmitt 109`.
**Proposed Solution**
1. Entries in Harper's dictionary that contain dashes/spaces should be protected against `SpellCheck`, just like ones without.
2. Those words should be suggested to use dashes if dashes are used, and spaces if spaces are used.
**Examples**
`.harper-dictionary.txt` - without this feature:
```
Bernières
sur
Mer
Messerschmitt
109
```
With this feature:
```
Bernières-sur-Mer
Messerschmitt 109
```
**Component**
- [x] Core engine
- [ ] Plugin/Extension
- [ ] Other: _____
Contributor guide
Research direction
Start in the core engine by tracing how entries from `.harper-dictionary.txt` are loaded and how `SpellCheck` handles dictionary words. Verify how hyphenated and space-separated entries are protected and how suggestions preserve their separators, using the existing core-engine behavior as the completion check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100