Skip to content

Commit 67ffdcf

Browse files
committed
test(server-util): regenerate ServerBlockNoteEditor markdown snapshot
The image-with-caption case now serializes to raw `<figure>` HTML and parses back with `caption: "Caption"` preserved (previously the caption was lost into a stray paragraph block).
1 parent 9d81c2e commit 67ffdcf

1 file changed

Lines changed: 4 additions & 23 deletions

File tree

packages/server-util/src/context/__snapshots__/ServerBlockNoteEditor.test.ts.snap

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ Paragraph
135135
136136
* list item
137137
138-
![Example](exampleURL)
139-
140-
Caption
138+
<figure><img alt="Example" src="exampleURL"><figcaption>Caption</figcaption></figure>
141139
142140
[Example](exampleURL)
143141
@@ -221,31 +219,14 @@ exports[`Test ServerBlockNoteEditor > converts to and from markdown (blocksToMar
221219
"id": "3",
222220
"props": {
223221
"backgroundColor": "default",
224-
"caption": "",
222+
"caption": "Caption",
225223
"name": "Example",
226224
"showPreview": true,
227225
"textAlignment": "left",
228226
"url": "exampleURL",
229227
},
230228
"type": "image",
231229
},
232-
{
233-
"children": [],
234-
"content": [
235-
{
236-
"styles": {},
237-
"text": "Caption",
238-
"type": "text",
239-
},
240-
],
241-
"id": "4",
242-
"props": {
243-
"backgroundColor": "default",
244-
"textAlignment": "left",
245-
"textColor": "default",
246-
},
247-
"type": "paragraph",
248-
},
249230
{
250231
"children": [],
251232
"content": [
@@ -261,7 +242,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from markdown (blocksToMar
261242
"type": "link",
262243
},
263244
],
264-
"id": "5",
245+
"id": "4",
265246
"props": {
266247
"backgroundColor": "default",
267248
"textAlignment": "left",
@@ -278,7 +259,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from markdown (blocksToMar
278259
"type": "text",
279260
},
280261
],
281-
"id": "6",
262+
"id": "5",
282263
"props": {
283264
"backgroundColor": "default",
284265
"textAlignment": "left",

0 commit comments

Comments
 (0)