Skip to content

Commit 78d5648

Browse files
committed
fix: optimize keepLineBreaksPlugin for mdast use
1 parent e4081c8 commit 78d5648

File tree

2 files changed

+57
-169
lines changed

2 files changed

+57
-169
lines changed

src/components/Message/renderText/__tests__/__snapshots__/renderText.test.js.snap

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,6 @@ exports[`keepLineBreaksPlugin present keeps line between lines with strong text
236236
<br />
237237
238238
239-
240-
241-
242-
243239
<p>
244240
This is the second line
245241
</p>
@@ -256,17 +252,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a blockquote 1`]
256252
<br />
257253
258254
259-
260-
261-
262-
263255
<br />
264256
265257
266-
267-
268-
269-
270258
<blockquote>
271259
272260
@@ -281,17 +269,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a blockquote 1`]
281269
<br />
282270
283271
284-
285-
286-
287-
288272
<br />
289273
290274
291-
292-
293-
294-
295275
<p>
296276
c
297277
</p>
@@ -308,17 +288,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a code block 1`]
308288
<br />
309289
310290
311-
312-
313-
314-
315291
<br />
316292
317293
318-
319-
320-
321-
322294
<p>
323295
<code>
324296
b
@@ -329,17 +301,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a code block 1`]
329301
<br />
330302
331303
332-
333-
334-
335-
336304
<br />
337305
338306
339-
340-
341-
342-
343307
<p>
344308
c
345309
</p>
@@ -356,33 +320,17 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a horizontal rule
356320
<br />
357321
358322
359-
360-
361-
362-
363323
<br />
364324
365325
366326
367327
368-
369-
370-
371-
372328
<br />
373329
374330
375-
376-
377-
378-
379331
<br />
380332
381333
382-
383-
384-
385-
386334
<p>
387335
b
388336
</p>
@@ -399,17 +347,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a strikethrough 1
399347
<br />
400348
401349
402-
403-
404-
405-
406350
<br />
407351
408352
409-
410-
411-
412-
413353
<p>
414354
~~xxx~~
415355
</p>
@@ -418,17 +358,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a strikethrough 1
418358
<br />
419359
420360
421-
422-
423-
424-
425361
<br />
426362
427363
428-
429-
430-
431-
432364
<p>
433365
b
434366
</p>
@@ -445,17 +377,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a table 1`] = `
445377
<br />
446378
447379
448-
449-
450-
451-
452380
<br />
453381
454382
455-
456-
457-
458-
459383
<p>
460384
| a | b | c | d |
461385
| - | :- | -: | :-: |
@@ -466,17 +390,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks around a table 1`] = `
466390
<br />
467391
468392
469-
470-
471-
472-
473393
<br />
474394
475395
476-
477-
478-
479-
480396
<p>
481397
c
482398
</p>
@@ -493,17 +409,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between paragraphs 1`] =
493409
<br />
494410
495411
496-
497-
498-
499-
500412
<br />
501413
502414
503-
504-
505-
506-
507415
<p>
508416
b
509417
</p>
@@ -512,17 +420,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between paragraphs 1`] =
512420
<br />
513421
514422
515-
516-
517-
518-
519423
<br />
520424
521425
522-
523-
524-
525-
526426
<p>
527427
c
528428
</p>
@@ -548,17 +448,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between the items in an
548448
<br />
549449
550450
551-
552-
553-
554-
555451
<br />
556452
557453
558-
559-
560-
561-
562454
<li>
563455
564456
@@ -573,17 +465,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between the items in an
573465
<br />
574466
575467
576-
577-
578-
579-
580468
<br />
581469
582470
583-
584-
585-
586-
587471
<li>
588472
589473
@@ -618,17 +502,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between the items in an
618502
<br />
619503
620504
621-
622-
623-
624-
625505
<br />
626506
627507
628-
629-
630-
631-
632508
<li>
633509
634510
@@ -643,17 +519,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks between the items in an
643519
<br />
644520
645521
646-
647-
648-
649-
650522
<br />
651523
652524
653-
654-
655-
656-
657525
<li>
658526
659527
@@ -679,17 +547,9 @@ exports[`keepLineBreaksPlugin present keeps line breaks under a heading 1`] = `
679547
<br />
680548
681549
682-
683-
684-
685-
686550
<br />
687551
688552
689-
690-
691-
692-
693553
<p>
694554
a
695555
</p>

0 commit comments

Comments
 (0)