fix: preserve composer double-space periods

This commit is contained in:
Ibrahim Khan
2026-07-30 22:27:17 +00:00
parent 09f0c64839
commit 41c3389db6
5 changed files with 135 additions and 6 deletions
@@ -76,6 +76,14 @@ token:
themes define `--interactive-selection` with its own alpha, so a translucent
mix of it is nearly invisible.
The content element keeps the existing correction policy: on in the mobile UI,
off elsewhere. CodeMirror also reads the attribute and reverts Apple and
Android's insert-period-on-double-space only when its value is exactly `off`.
`editor/autocorrect.ts` uses the HTML standard's
[ASCII case-insensitive `autocorrect` keywords](https://html.spec.whatwg.org/multipage/interaction.html#attr-autocorrect)
to keep desktop word correction off while avoiding that CodeMirror-only
revert. Its platform checks deliberately match CodeMirror's own browser flags.
`composerLanguage.ts` retokenizes the whole document on every change. The
composer holds a prompt, not a source file: it is short enough that a full pass
is cheaper and far simpler than incremental mapping, and it keeps the editor