Files
gitmost/packages/git-sync/test
claude code agent 227 7abce93543 fix(git-sync): round-trip the spoiler mark and image caption
After merging develop, git-sync's markdown converter still predated two
editor features and silently dropped them on every sync:

- Spoiler mark (#259): had no schema entry, so `<span data-spoiler>` from
  the canonical lossless form re-parsed as plain text and the mark was
  lost. Register a Spoiler mark mirroring @docmost/editor-ext + the MCP
  schema, and emit `<span data-spoiler="true">…</span>` on PM->MD.
- Image caption (#221): the converter assumed no caption attribute existed
  (the branch was dead). The image schema now carries a plain-text caption
  (data-caption); register it and route a captioned image through the raw
  <img> form (same lossless convention as the other Docmost image attrs).
  Caption-less images keep the lighter `![](src)` form.

Both survive PM->MD->PM unchanged; raw `<span data-spoiler>` / `<img
data-caption>` in incoming markdown parse back. New round-trip tests in
markdown-roundtrip-spoiler-caption.test.ts; schema-surface snapshot updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 02:53:43 +03:00
..