@khanacademy/perseus 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/es/index.css +12 -12
- package/dist/es/index.js +32 -26
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +12 -12
- package/dist/index.js +32 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/perseus-markdown_test.jsx.snap +111 -111
- package/src/__tests__/item-renderer_test.jsx +9 -9
- package/src/__tests__/jipt-paragraphs_test.js +3 -3
- package/src/__tests__/renderer_test.jsx +22 -22
- package/src/__tests__/server-item-renderer_test.jsx +7 -7
- package/src/components/__tests__/sortable_test.jsx +7 -7
- package/src/multi-items/__tests__/__snapshots__/multi-renderer_test.js.snap +5 -5
- package/src/multi-items/__tests__/multi-renderer_test.js +90 -90
- package/src/renderer.jsx +2 -2
- package/src/styles/articles.less +6 -6
- package/src/widgets/__tests__/__snapshots__/grapher_test.jsx.snap +68 -68
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +5 -5
- package/src/widgets/__tests__/__snapshots__/interaction_test.jsx.snap +5 -5
- package/src/widgets/__tests__/__snapshots__/interactive-graph_test.jsx.snap +2 -2
- package/src/widgets/__tests__/__snapshots__/passage_test.jsx.snap +2 -2
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +52 -52
- package/src/widgets/__tests__/categorizer_test.jsx +5 -5
- package/src/widgets/__tests__/explanation_test.js +5 -5
- package/src/widgets/__tests__/graded-group-set_test.jsx +2 -2
- package/src/widgets/__tests__/group_test.jsx +49 -49
- package/src/widgets/__tests__/numeric-input_test.jsx +5 -5
- package/src/widgets/__tests__/passage_test.jsx +1 -1
- package/src/widgets/__tests__/radio/base-radio_test.jsx +28 -1
- package/src/widgets/categorizer.jsx +1 -1
- package/src/widgets/expression.jsx +6 -6
- package/src/widgets/input-number.jsx +4 -4
- package/src/widgets/numeric-input.jsx +5 -5
- package/src/widgets/radio/base-radio.jsx +8 -3
- package/src/widgets/radio/choice-icon/library-choice-icon.jsx +2 -2
- package/src/widgets/radio/choice.jsx +1 -1
- package/src/widgets/radio/widget.jsx +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`perseus markdown output should output columns 1`] = `
|
|
4
|
-
|
|
4
|
+
[
|
|
5
5
|
<div
|
|
6
6
|
className="perseus-two-columns"
|
|
7
7
|
>
|
|
@@ -45,7 +45,7 @@ Array [
|
|
|
45
45
|
`;
|
|
46
46
|
|
|
47
47
|
exports[`perseus markdown output should output paragraphs 1`] = `
|
|
48
|
-
|
|
48
|
+
[
|
|
49
49
|
<div
|
|
50
50
|
className="paragraph"
|
|
51
51
|
>
|
|
@@ -55,7 +55,7 @@ Array [
|
|
|
55
55
|
`;
|
|
56
56
|
|
|
57
57
|
exports[`perseus markdown output should output titled table with unescaped dollars 1`] = `
|
|
58
|
-
|
|
58
|
+
[
|
|
59
59
|
<div
|
|
60
60
|
className="perseus-titled-table"
|
|
61
61
|
>
|
|
@@ -71,19 +71,19 @@ Array [
|
|
|
71
71
|
<tr>
|
|
72
72
|
<th
|
|
73
73
|
scope="col"
|
|
74
|
-
style={
|
|
74
|
+
style={{}}
|
|
75
75
|
>
|
|
76
76
|
header 1
|
|
77
77
|
</th>
|
|
78
78
|
<th
|
|
79
79
|
scope="col"
|
|
80
|
-
style={
|
|
80
|
+
style={{}}
|
|
81
81
|
>
|
|
82
82
|
header 2
|
|
83
83
|
</th>
|
|
84
84
|
<th
|
|
85
85
|
scope="col"
|
|
86
|
-
style={
|
|
86
|
+
style={{}}
|
|
87
87
|
>
|
|
88
88
|
header 3
|
|
89
89
|
</th>
|
|
@@ -92,51 +92,51 @@ Array [
|
|
|
92
92
|
<tbody>
|
|
93
93
|
<tr>
|
|
94
94
|
<td
|
|
95
|
-
style={
|
|
95
|
+
style={{}}
|
|
96
96
|
>
|
|
97
97
|
data 1
|
|
98
98
|
</td>
|
|
99
99
|
<td
|
|
100
|
-
style={
|
|
100
|
+
style={{}}
|
|
101
101
|
>
|
|
102
102
|
data 2
|
|
103
103
|
</td>
|
|
104
104
|
<td
|
|
105
|
-
style={
|
|
105
|
+
style={{}}
|
|
106
106
|
>
|
|
107
107
|
data 3
|
|
108
108
|
</td>
|
|
109
109
|
</tr>
|
|
110
110
|
<tr>
|
|
111
111
|
<td
|
|
112
|
-
style={
|
|
112
|
+
style={{}}
|
|
113
113
|
>
|
|
114
114
|
data 4
|
|
115
115
|
</td>
|
|
116
116
|
<td
|
|
117
|
-
style={
|
|
117
|
+
style={{}}
|
|
118
118
|
>
|
|
119
119
|
$data 5
|
|
120
120
|
</td>
|
|
121
121
|
<td
|
|
122
|
-
style={
|
|
122
|
+
style={{}}
|
|
123
123
|
>
|
|
124
124
|
data 6
|
|
125
125
|
</td>
|
|
126
126
|
</tr>
|
|
127
127
|
<tr>
|
|
128
128
|
<td
|
|
129
|
-
style={
|
|
129
|
+
style={{}}
|
|
130
130
|
>
|
|
131
131
|
data 7
|
|
132
132
|
</td>
|
|
133
133
|
<td
|
|
134
|
-
style={
|
|
134
|
+
style={{}}
|
|
135
135
|
>
|
|
136
136
|
data 8
|
|
137
137
|
</td>
|
|
138
138
|
<td
|
|
139
|
-
style={
|
|
139
|
+
style={{}}
|
|
140
140
|
>
|
|
141
141
|
data 9
|
|
142
142
|
</td>
|
|
@@ -148,7 +148,7 @@ Array [
|
|
|
148
148
|
`;
|
|
149
149
|
|
|
150
150
|
exports[`perseus markdown output should render \`\`\`alt screenreader blocks 1`] = `
|
|
151
|
-
|
|
151
|
+
[
|
|
152
152
|
<div
|
|
153
153
|
className="perseus-markdown-alt perseus-sr-only"
|
|
154
154
|
>
|
|
@@ -162,7 +162,7 @@ Array [
|
|
|
162
162
|
`;
|
|
163
163
|
|
|
164
164
|
exports[`perseus markdown output with linter should output titled table with unescaped dollars in lint 1`] = `
|
|
165
|
-
|
|
165
|
+
[
|
|
166
166
|
<div
|
|
167
167
|
className="perseus-titled-table"
|
|
168
168
|
>
|
|
@@ -170,7 +170,7 @@ Array [
|
|
|
170
170
|
inline={false}
|
|
171
171
|
insideTable={false}
|
|
172
172
|
message="Unescaped dollar sign:
|
|
173
|
-
Dollar signs must appear in pairs or be escaped as
|
|
173
|
+
Dollar signs must appear in pairs or be escaped as \\$"
|
|
174
174
|
ruleName="unescaped-dollar"
|
|
175
175
|
severity={1}
|
|
176
176
|
>
|
|
@@ -186,19 +186,19 @@ Dollar signs must appear in pairs or be escaped as \\\\$"
|
|
|
186
186
|
<tr>
|
|
187
187
|
<th
|
|
188
188
|
scope="col"
|
|
189
|
-
style={
|
|
189
|
+
style={{}}
|
|
190
190
|
>
|
|
191
191
|
header 1
|
|
192
192
|
</th>
|
|
193
193
|
<th
|
|
194
194
|
scope="col"
|
|
195
|
-
style={
|
|
195
|
+
style={{}}
|
|
196
196
|
>
|
|
197
197
|
header 2
|
|
198
198
|
</th>
|
|
199
199
|
<th
|
|
200
200
|
scope="col"
|
|
201
|
-
style={
|
|
201
|
+
style={{}}
|
|
202
202
|
>
|
|
203
203
|
header 3
|
|
204
204
|
</th>
|
|
@@ -207,35 +207,35 @@ Dollar signs must appear in pairs or be escaped as \\\\$"
|
|
|
207
207
|
<tbody>
|
|
208
208
|
<tr>
|
|
209
209
|
<td
|
|
210
|
-
style={
|
|
210
|
+
style={{}}
|
|
211
211
|
>
|
|
212
212
|
data 1
|
|
213
213
|
</td>
|
|
214
214
|
<td
|
|
215
|
-
style={
|
|
215
|
+
style={{}}
|
|
216
216
|
>
|
|
217
217
|
data 2
|
|
218
218
|
</td>
|
|
219
219
|
<td
|
|
220
|
-
style={
|
|
220
|
+
style={{}}
|
|
221
221
|
>
|
|
222
222
|
data 3
|
|
223
223
|
</td>
|
|
224
224
|
</tr>
|
|
225
225
|
<tr>
|
|
226
226
|
<td
|
|
227
|
-
style={
|
|
227
|
+
style={{}}
|
|
228
228
|
>
|
|
229
229
|
data 4
|
|
230
230
|
</td>
|
|
231
231
|
<td
|
|
232
|
-
style={
|
|
232
|
+
style={{}}
|
|
233
233
|
>
|
|
234
234
|
<Lint
|
|
235
235
|
inline={true}
|
|
236
236
|
insideTable={true}
|
|
237
237
|
message="Unescaped dollar sign:
|
|
238
|
-
Dollar signs must appear in pairs or be escaped as
|
|
238
|
+
Dollar signs must appear in pairs or be escaped as \\$"
|
|
239
239
|
ruleName="unescaped-dollar"
|
|
240
240
|
severity={1}
|
|
241
241
|
>
|
|
@@ -244,24 +244,24 @@ Dollar signs must appear in pairs or be escaped as \\\\$"
|
|
|
244
244
|
data 5
|
|
245
245
|
</td>
|
|
246
246
|
<td
|
|
247
|
-
style={
|
|
247
|
+
style={{}}
|
|
248
248
|
>
|
|
249
249
|
data 6
|
|
250
250
|
</td>
|
|
251
251
|
</tr>
|
|
252
252
|
<tr>
|
|
253
253
|
<td
|
|
254
|
-
style={
|
|
254
|
+
style={{}}
|
|
255
255
|
>
|
|
256
256
|
data 7
|
|
257
257
|
</td>
|
|
258
258
|
<td
|
|
259
|
-
style={
|
|
259
|
+
style={{}}
|
|
260
260
|
>
|
|
261
261
|
data 8
|
|
262
262
|
</td>
|
|
263
263
|
<td
|
|
264
|
-
style={
|
|
264
|
+
style={{}}
|
|
265
265
|
>
|
|
266
266
|
data 9
|
|
267
267
|
</td>
|
|
@@ -274,94 +274,94 @@ Dollar signs must appear in pairs or be escaped as \\\\$"
|
|
|
274
274
|
`;
|
|
275
275
|
|
|
276
276
|
exports[`perseus markdown parser should parse titled table with unescaped dollars 1`] = `
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"table":
|
|
280
|
-
"align":
|
|
277
|
+
[
|
|
278
|
+
{
|
|
279
|
+
"table": {
|
|
280
|
+
"align": [
|
|
281
281
|
null,
|
|
282
282
|
null,
|
|
283
283
|
null,
|
|
284
284
|
],
|
|
285
|
-
"cells":
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
285
|
+
"cells": [
|
|
286
|
+
[
|
|
287
|
+
[
|
|
288
|
+
{
|
|
289
289
|
"content": "data 1",
|
|
290
290
|
"type": "text",
|
|
291
291
|
},
|
|
292
292
|
],
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
[
|
|
294
|
+
{
|
|
295
295
|
"content": "data 2",
|
|
296
296
|
"type": "text",
|
|
297
297
|
},
|
|
298
298
|
],
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
[
|
|
300
|
+
{
|
|
301
301
|
"content": "data 3",
|
|
302
302
|
"type": "text",
|
|
303
303
|
},
|
|
304
304
|
],
|
|
305
305
|
],
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
[
|
|
307
|
+
[
|
|
308
|
+
{
|
|
309
309
|
"content": "data 4",
|
|
310
310
|
"type": "text",
|
|
311
311
|
},
|
|
312
312
|
],
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
[
|
|
314
|
+
{
|
|
315
315
|
"type": "unescapedDollar",
|
|
316
316
|
},
|
|
317
|
-
|
|
317
|
+
{
|
|
318
318
|
"content": "data 5",
|
|
319
319
|
"type": "text",
|
|
320
320
|
},
|
|
321
321
|
],
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
[
|
|
323
|
+
{
|
|
324
324
|
"content": "data 6",
|
|
325
325
|
"type": "text",
|
|
326
326
|
},
|
|
327
327
|
],
|
|
328
328
|
],
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
329
|
+
[
|
|
330
|
+
[
|
|
331
|
+
{
|
|
332
332
|
"content": "data 7",
|
|
333
333
|
"type": "text",
|
|
334
334
|
},
|
|
335
335
|
],
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
[
|
|
337
|
+
{
|
|
338
338
|
"content": "data 8",
|
|
339
339
|
"type": "text",
|
|
340
340
|
},
|
|
341
341
|
],
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
[
|
|
343
|
+
{
|
|
344
344
|
"content": "data 9",
|
|
345
345
|
"type": "text",
|
|
346
346
|
},
|
|
347
347
|
],
|
|
348
348
|
],
|
|
349
349
|
],
|
|
350
|
-
"header":
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
"header": [
|
|
351
|
+
[
|
|
352
|
+
{
|
|
353
353
|
"content": "header 1",
|
|
354
354
|
"type": "text",
|
|
355
355
|
},
|
|
356
356
|
],
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
[
|
|
358
|
+
{
|
|
359
359
|
"content": "header 2",
|
|
360
360
|
"type": "text",
|
|
361
361
|
},
|
|
362
362
|
],
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
[
|
|
364
|
+
{
|
|
365
365
|
"content": "header 3",
|
|
366
366
|
"type": "text",
|
|
367
367
|
},
|
|
@@ -369,10 +369,10 @@ Array [
|
|
|
369
369
|
],
|
|
370
370
|
"type": "table",
|
|
371
371
|
},
|
|
372
|
-
"title":
|
|
373
|
-
|
|
374
|
-
"content":
|
|
375
|
-
|
|
372
|
+
"title": [
|
|
373
|
+
{
|
|
374
|
+
"content": [
|
|
375
|
+
{
|
|
376
376
|
"content": "Table title",
|
|
377
377
|
"type": "text",
|
|
378
378
|
},
|
|
@@ -386,105 +386,105 @@ Array [
|
|
|
386
386
|
`;
|
|
387
387
|
|
|
388
388
|
exports[`perseus markdown parser with linter should lint unescaped dollars in titled table 1`] = `
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
"table":
|
|
389
|
+
[
|
|
390
|
+
{
|
|
391
|
+
"table": {
|
|
392
392
|
"blockHighlight": undefined,
|
|
393
|
-
"content":
|
|
394
|
-
"align":
|
|
393
|
+
"content": {
|
|
394
|
+
"align": [
|
|
395
395
|
null,
|
|
396
396
|
null,
|
|
397
397
|
null,
|
|
398
398
|
],
|
|
399
|
-
"cells":
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
"cells": [
|
|
400
|
+
[
|
|
401
|
+
[
|
|
402
|
+
{
|
|
403
403
|
"content": "data 1",
|
|
404
404
|
"type": "text",
|
|
405
405
|
},
|
|
406
406
|
],
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
[
|
|
408
|
+
{
|
|
409
409
|
"content": "data 2",
|
|
410
410
|
"type": "text",
|
|
411
411
|
},
|
|
412
412
|
],
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
[
|
|
414
|
+
{
|
|
415
415
|
"content": "data 3",
|
|
416
416
|
"type": "text",
|
|
417
417
|
},
|
|
418
418
|
],
|
|
419
419
|
],
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
[
|
|
421
|
+
[
|
|
422
|
+
{
|
|
423
423
|
"content": "data 4",
|
|
424
424
|
"type": "text",
|
|
425
425
|
},
|
|
426
426
|
],
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
[
|
|
428
|
+
{
|
|
429
429
|
"blockHighlight": undefined,
|
|
430
|
-
"content":
|
|
430
|
+
"content": {
|
|
431
431
|
"type": "unescapedDollar",
|
|
432
432
|
},
|
|
433
433
|
"insideTable": true,
|
|
434
434
|
"message": "Unescaped dollar sign:
|
|
435
|
-
Dollar signs must appear in pairs or be escaped as
|
|
435
|
+
Dollar signs must appear in pairs or be escaped as \\$",
|
|
436
436
|
"ruleName": "unescaped-dollar",
|
|
437
437
|
"severity": 1,
|
|
438
438
|
"type": "lint",
|
|
439
439
|
},
|
|
440
|
-
|
|
440
|
+
{
|
|
441
441
|
"content": "data 5",
|
|
442
442
|
"type": "text",
|
|
443
443
|
},
|
|
444
444
|
],
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
[
|
|
446
|
+
{
|
|
447
447
|
"content": "data 6",
|
|
448
448
|
"type": "text",
|
|
449
449
|
},
|
|
450
450
|
],
|
|
451
451
|
],
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
[
|
|
453
|
+
[
|
|
454
|
+
{
|
|
455
455
|
"content": "data 7",
|
|
456
456
|
"type": "text",
|
|
457
457
|
},
|
|
458
458
|
],
|
|
459
|
-
|
|
460
|
-
|
|
459
|
+
[
|
|
460
|
+
{
|
|
461
461
|
"content": "data 8",
|
|
462
462
|
"type": "text",
|
|
463
463
|
},
|
|
464
464
|
],
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
[
|
|
466
|
+
{
|
|
467
467
|
"content": "data 9",
|
|
468
468
|
"type": "text",
|
|
469
469
|
},
|
|
470
470
|
],
|
|
471
471
|
],
|
|
472
472
|
],
|
|
473
|
-
"header":
|
|
474
|
-
|
|
475
|
-
|
|
473
|
+
"header": [
|
|
474
|
+
[
|
|
475
|
+
{
|
|
476
476
|
"content": "header 1",
|
|
477
477
|
"type": "text",
|
|
478
478
|
},
|
|
479
479
|
],
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
[
|
|
481
|
+
{
|
|
482
482
|
"content": "header 2",
|
|
483
483
|
"type": "text",
|
|
484
484
|
},
|
|
485
485
|
],
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
[
|
|
487
|
+
{
|
|
488
488
|
"content": "header 3",
|
|
489
489
|
"type": "text",
|
|
490
490
|
},
|
|
@@ -494,15 +494,15 @@ Dollar signs must appear in pairs or be escaped as \\\\$",
|
|
|
494
494
|
},
|
|
495
495
|
"insideTable": false,
|
|
496
496
|
"message": "Unescaped dollar sign:
|
|
497
|
-
Dollar signs must appear in pairs or be escaped as
|
|
497
|
+
Dollar signs must appear in pairs or be escaped as \\$",
|
|
498
498
|
"ruleName": "unescaped-dollar",
|
|
499
499
|
"severity": 1,
|
|
500
500
|
"type": "lint",
|
|
501
501
|
},
|
|
502
|
-
"title":
|
|
503
|
-
|
|
504
|
-
"content":
|
|
505
|
-
|
|
502
|
+
"title": [
|
|
503
|
+
{
|
|
504
|
+
"content": [
|
|
505
|
+
{
|
|
506
506
|
"content": "Table title",
|
|
507
507
|
"type": "text",
|
|
508
508
|
},
|
|
@@ -535,47 +535,47 @@ describe("item renderer", () => {
|
|
|
535
535
|
|
|
536
536
|
// Assert
|
|
537
537
|
expect(scores).toMatchInlineSnapshot(`
|
|
538
|
-
|
|
539
|
-
"mock-widget 1":
|
|
538
|
+
{
|
|
539
|
+
"mock-widget 1": {
|
|
540
540
|
"correct": true,
|
|
541
541
|
"empty": false,
|
|
542
542
|
"guess": "user input for mock-widget 1",
|
|
543
543
|
"message": undefined,
|
|
544
|
-
"state":
|
|
544
|
+
"state": {
|
|
545
545
|
"a": 1,
|
|
546
546
|
"b": "state",
|
|
547
547
|
"id": "mock-widget 1",
|
|
548
548
|
},
|
|
549
549
|
},
|
|
550
|
-
"mock-widget 2":
|
|
550
|
+
"mock-widget 2": {
|
|
551
551
|
"correct": false,
|
|
552
552
|
"empty": true,
|
|
553
553
|
"guess": "user input for mock-widget 2",
|
|
554
554
|
"message": "please enter a value",
|
|
555
|
-
"state":
|
|
555
|
+
"state": {
|
|
556
556
|
"a": 1,
|
|
557
557
|
"b": "state",
|
|
558
558
|
"id": "mock-widget 2",
|
|
559
559
|
},
|
|
560
560
|
"suppressAlmostThere": undefined,
|
|
561
561
|
},
|
|
562
|
-
"mock-widget 3":
|
|
562
|
+
"mock-widget 3": {
|
|
563
563
|
"correct": true,
|
|
564
564
|
"empty": false,
|
|
565
565
|
"guess": "user input for mock-widget 3",
|
|
566
566
|
"message": undefined,
|
|
567
|
-
"state":
|
|
567
|
+
"state": {
|
|
568
568
|
"a": 1,
|
|
569
569
|
"b": "state",
|
|
570
570
|
"id": "mock-widget 3",
|
|
571
571
|
},
|
|
572
572
|
},
|
|
573
|
-
"mock-widget 4":
|
|
573
|
+
"mock-widget 4": {
|
|
574
574
|
"correct": false,
|
|
575
575
|
"empty": true,
|
|
576
576
|
"guess": "user input for mock-widget 4",
|
|
577
577
|
"message": "please enter a value",
|
|
578
|
-
"state":
|
|
578
|
+
"state": {
|
|
579
579
|
"a": 1,
|
|
580
580
|
"b": "state",
|
|
581
581
|
"id": "mock-widget 4",
|
|
@@ -7,7 +7,7 @@ const {parseToArray} = JiptParagraphs;
|
|
|
7
7
|
describe("jipt-paragraphs", () => {
|
|
8
8
|
it("should split paragraphs using custom JIPT SimpleMarkdown rules", () => {
|
|
9
9
|
expect(parseToArray(" \n\nhello\n\n")).toMatchInlineSnapshot(`
|
|
10
|
-
|
|
10
|
+
[
|
|
11
11
|
" ",
|
|
12
12
|
"hello",
|
|
13
13
|
]
|
|
@@ -23,9 +23,9 @@ describe("jipt-paragraphs", () => {
|
|
|
23
23
|
"computer programmer!",
|
|
24
24
|
),
|
|
25
25
|
).toMatchInlineSnapshot(`
|
|
26
|
-
|
|
26
|
+
[
|
|
27
27
|
"Let's write the canonical Hello World in Javascript",
|
|
28
|
-
"const x =
|
|
28
|
+
"const x = "hello world";
|
|
29
29
|
console.log(x);",
|
|
30
30
|
"**Congratulations, you are on your way to becoming a computer programmer!",
|
|
31
31
|
]
|