Skip to content

Spell check: don't flag words wrapped in single quotes (#11975)#11976

Merged
niksedk merged 1 commit into
mainfrom
fix/spellcheck-quoted-word-11975
Jun 29, 2026
Merged

Spell check: don't flag words wrapped in single quotes (#11975)#11976
niksedk merged 1 commit into
mainfrom
fix/spellcheck-quoted-word-11975

Conversation

@niksedk

@niksedk niksedk commented Jun 29, 2026

Copy link
Copy Markdown
Member

Fixes #11975

Problem

A subtitle line wrapped in single quotes used as quotation marks, e.g. 'Een ridder heeft moed gezworen.', was flagged by the spell checker on the first word. The issue reporter saw the common word een flagged.

The leading ' (which the reporter calls an "accent") stays attached to the first word during word splitting, producing 'Een. The apostrophe is intentionally not a split character because it's part of contractions like 'n and don't, so 'Een fails the dictionary lookup and gets flagged.

screenshot

Fix

When a word isn't found, retry the lookup with the surrounding apostrophes trimmed — only accepting it when the trimmed form is a real dictionary word, name, or user word (so genuine typos like 'Eenn' are still flagged). This mirrors the existing behavior in OcrFixEngine, which already trims ' " - and re-checks.

Applied in two places that lacked it:

  • SpellCheckManager — the interactive spell-check window (shown in the screenshot).
  • SpellChecker base IsWordCorrect — used by the editor's red-underline highlighting, so quoted words aren't underlined either.

🤖 Generated with Claude Code

A subtitle line wrapped in single quotes used as quotation marks, e.g.
'Een ridder heeft moed gezworen.' kept the leading apostrophe attached to
the first word ('Een) during word splitting, so the dictionary lookup failed
and the word was flagged. The apostrophe is intentionally not a split char
because it is part of contractions ('n, don't), so retry the lookup with the
surrounding apostrophes trimmed when the original word is not found.

Applied to both the interactive spell-check window (SpellCheckManager) and the
editor's misspelled-word underline (SpellChecker base), mirroring the existing
OcrFixEngine behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit 2eb6a13 into main Jun 29, 2026
3 checks passed
@niksedk niksedk deleted the fix/spellcheck-quoted-word-11975 branch June 29, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spelling check triggers on the accent.

1 participant