diff --git a/packages/git-sync/test/stabilize.test.ts b/packages/git-sync/test/stabilize.test.ts index d5303e9f..c781546e 100644 --- a/packages/git-sync/test/stabilize.test.ts +++ b/packages/git-sync/test/stabilize.test.ts @@ -55,10 +55,15 @@ describe('stabilizePageFile — normalize-on-write fixpoint (SPEC §11)', () => const file2 = await stabilizePageFile(doc2, meta); expect(file2).toBe(file1); - // The materialized diagram default is present in the stabilized body (proof - // that the convergence pass actually ran, not just that two naive exports - // happened to match). - expect(body1).toContain('data-align="center"'); + // The drawio node was materialized to its canonical HTML form by the + // convergence pass — a bare `{ src }` doc node becomes the full + // `
` — proof the pass actually ran, not + // just two naive exports happening to match. Assert on the stable canonical + // markers rather than `data-align="center"`: center is a schema default the + // converter may omit (see prosemirror-markdown media-html.ts), so it is not + // a reliable convergence proof. + expect(body1).toContain('data-type="drawio"'); + expect(body1).toContain('data-src="/d.drawio"'); }); it('already-stable content is unchanged by the pass (idempotent)', async () => { diff --git a/packages/prosemirror-markdown/src/lib/markdown-converter.ts b/packages/prosemirror-markdown/src/lib/markdown-converter.ts index 2d173e52..481c3691 100644 --- a/packages/prosemirror-markdown/src/lib/markdown-converter.ts +++ b/packages/prosemirror-markdown/src/lib/markdown-converter.ts @@ -48,6 +48,52 @@ export interface ConvertProseMirrorToMarkdownOptions { dropResolvedCommentAnchors?: boolean; } +/** + * Adjacent sibling lists that share a markdown MARKER FAMILY re-parse as ONE + * merged list — bulletList and taskList both emit `- ` markers (→ a single + * `