Spellcheck option C: the build flags misspellings, the editor underlines them on every slide in every browser - #16
Merged
Conversation
…ck carries the list, the editor underlines them on every slide in every browser lib/spell.mjs tokenises what a reader sees (slide rows, html runs, master rows), skips what a dictionary cannot judge (short, all caps, inner capitals, digits), honours spell.ignore, and loads nspell + dictionary-en when installed (optional devDependency, like Playwright). create writes /*SPELL*/[…]/*/SPELL*/ beside the log; the CLI prints the flagged words or says the dictionary is missing. The template paints them through the CSS Highlight API after every live draw and on input in the edited row; never while presenting, on paper or in the ⤓ PDF; the ✓ toggle clears and repaints; the browser's own checker stays as the second layer. Gate: test/spell.test.mjs; the deck.html and library.html gates build with the same checker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Spellcheck option C: the build checks every word once, the deck carries the refused list, the editor underlines those words on every slide in every browser.
lib/spell.mjs:textsOf(slide rows, html runs, master rows),checkable(skips tokens a dictionary cannot judge: under three letters, all caps, inner capitals, digits),flags(deck, correct)(sorted, lowercase, unique; honoursspell.ignore),loadChecker(lang)(nspell + dictionary-en, en only,nullwhen not installed).createtakes{spell}and writes/*SPELL*/[…]/*/SPELL*/into the file next to the log and the versions. The CLI loads the checker, prints the flagged words, and says plainly when the dictionary is not installed.--fromre-checks after the human's edits land.::highlight(spell)red wavy underline through the CSS Highlight API, painted after every live canvas draw and on input in the row being edited; none while presenting, on paper, or in the ⤓ PDF. The ✓ toggle clears and repaints. The browser's ownspellcheckattribute stays as the second layer.spell: {ignore: ["decklet"]}. Documented in SKILL.md next tolang.Why
Kyle never saw the spellcheck button do anything: option A hands the work to the browser, and Chrome marks only the focused row after a keystroke, Safari marks only typed words, and the Claude desktop pane has spellcheck off. A word list in the file paints the same everywhere.
Verification
test/spell.test.mjs: tokeniser rules, create writes the block (and[]without a checker), the real dictionary agrees on the seeded typos and rejectsde, and a live Chromium proof: three flagged words on slide 1 (master row, text row, html run), one on slide 2, the toggle clears and repaints, typing a flagged word underlines it live, presenting paints none.renewls,reveiw,colour,deckletunderlined on an unfocused slide, which option A never managed there.node --test test/**/*.test.mjs→ 170 pass, 0 fail, 0 skipped (Playwright live tests included).Follow-up owned by Kyle: adriany task 1943 covers the versions button; the same deck is the place to try this.
🤖 Generated with Claude Code