Repository navigation
Description
An edit to one paragraph can delete authored U+200B characters from untouched code, prose, or YAML. Separate authored characters from editor-generated caret placeholders so source preservation does not alter user content.
Priority: P2 / Medium — silent content alteration. Focused browser comparisons reproduced the stripping on baseline 41ea238a99aea72b197fa33dc1001bd9ef09a0e5 as well as #80.
Reproduction and findings
In a disposable workspace, create a synthetic fixture with an actual U+200B using Python:
from pathlib import Path
Path("authored-zwsp.md").write_text("```text\nleft\u200bright\n```\n\nEnd\n", encoding="utf-8")- Open the file in Binary Markdown visual mode.
- Change only
EndtoEnd!; do not edit the code block. - Save, close, and reopen. Inspect the file with a code-point-aware comparison.
Observed in the installed VSIX: the untouched code payload changes from left + U+200B + right to leftright; the loss survives reopening. Browser probes also reproduced loss from untouched prose and YAML front matter.
Expected: the code payload and other untouched authored content retain their original characters. U+200B is invisible here, so a visual-only assertion is insufficient.
Scope and acceptance criteria
- Remove only identifiable editor-generated caret scaffolding; do not globally strip the same Unicode character from authored source.
- Add exact-byte/code-point regressions for prose, fenced code and YAML after an unrelated edit.
- Verify repeated saves, source switching, undo/redo and installed save/reopen without introducing placeholder artifacts.
Source evidence
htmlToMarkdown removes every U+200B after retained block source has been reassembled, bypassing the new untouched-block preservation mechanism.
Build identity and verification boundary
Recorded during the 2026-09-27 audit of #80 at ffbdad524d393aa783760f4829cb995d8b9d6405 (package version 0.4.0), using Node 24.21.0 on macOS ARM64. The tested product source was unmodified. This is an unreleased development snapshot.
Reproduced in the installed VSIX with VS Code 1.138.0 using an isolated owned profile and synthetic documents. Package SHA-256: b813d91c719b8530ea2bbce18dcf924fd605ed7fc0f689d2b5a2f1305d3092fe. These are native host/filesystem observations; other operating systems were not retested for this case.
Reproduce and validate changes using the checkout's build guide and testing guide. Keep evidence synthetic and sanitized.
Activity