Repository navigation
Conversation
The rich-text surface rewrote typed text: the inline scanner paired any marker with a later identical one, so identifiers, math and code such as snake_case_name, 2 * 3 * 4 or C++ were turned into emphasis and the source was re-serialized around them. For an LLM chat input the value sent must equal what the user typed, so the model is rebuilt around that contract. - Parser: port of markdown-it's inline rules (delimiter runs with flanking, rule of three, backtick runs, escapes, entities, ~~ and the ins plugin's ++) using markdown-it's own character classes, so the editor hides exactly the markers the renderer consumes. Lists keep indentation and accept `1)`; CRLF fences are recognised. Lines are parsed independently and cached, and models are cached per source, so a keystroke re-parses only its line. - Edits: new wysiwygEdit module applies display edits between the surviving source bytes and verifies by re-parsing that every span survived. Repairs escalate from escaping typed markers to swapping _/* families to re-serializing only the edited line. Untouched lines stay byte-identical. Typed markdown takes effect once valid and the caret continues outside the closed span (`caretOutside`). Code spans are not extended by typing at their end; Enter continues bullet, ordered and quote prefixes and exits an empty one; trailing whitespace moves outside closing delimiters. - Toolbar toggles format the selection, or the word around a collapsed caret, and never split a surrogate pair. - Tests: wysiwygFidelity.test.ts asserts typed/pasted text reaches the value unchanged and that other lines are never rewritten. - Docs: MarkdownEditor section in INPUT.md, architecture notes, STATUS and a device validation checklist. The lint scripts drop the env prefix so they run on Windows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings in the 9.0.x release commits: version bump, the cleanup that moved the streaming cursor style into StyleSheet (same fix on both sides), the prettier config change, README updates and the disabled npm publish workflow. src/ is re-run through prettier so format-check passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MAgGTHfWZVVvwSK1rJYbVn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MAgGTHfWZVVvwSK1rJYbVn
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.
Summary
MarkdownEditor(plain/rich toggle) and standaloneMarkdownWysiwygEditor/EditorToolbar, with a CommonMark-faithful model shared with the renderer's inline rules. Typed and pasted text reachesvalueunchanged, and untouched lines are never rewritten.src/, bumps the version to 9.1.0 and addsMarkdownEditorto the README.Public API: additions only, nothing removed (checked against the published 9.0.3 typings).
Test plan
npm run typecheck,npm run lint,npm run format-checknpm test -- --runInBand: 13 suites, 306 tests passingnpm run build,npm pack --dry-rundoc/wysiwyg-device-checklist.md(blocks release)🤖 Generated with Claude Code
https://claude.ai/code/session_01MAgGTHfWZVVvwSK1rJYbVn