@@ -49,10 +49,10 @@ describe('parsing error', () => {
4949} ) ;
5050
5151test ( 'bold' , ( ) => {
52- expect ( 'Hello, *world*!' ) . toBeParsedAs ( [
53- { type : 'syntax' , start : 7 , length : 1 } ,
54- { type : 'bold' , start : 8 , length : 5 } ,
55- { type : 'syntax' , start : 13 , length : 1 } ,
52+ expect ( 'Hello, ** world* *!' ) . toBeParsedAs ( [
53+ { type : 'syntax' , start : 7 , length : 2 } ,
54+ { type : 'bold' , start : 9 , length : 5 } ,
55+ { type : 'syntax' , start : 14 , length : 2 } ,
5656 ] ) ;
5757} ) ;
5858
@@ -281,19 +281,19 @@ test('h1', () => {
281281} ) ;
282282
283283test ( 'nested bold and italic' , ( ) => {
284- expect ( '*_Hello_*, _*world*_!' ) . toBeParsedAs ( [
285- { type : 'syntax' , start : 0 , length : 1 } ,
286- { type : 'bold' , start : 1 , length : 7 } ,
287- { type : 'syntax' , start : 1 , length : 1 } ,
288- { type : 'italic' , start : 2 , length : 5 } ,
289- { type : 'syntax' , start : 7 , length : 1 } ,
284+ expect ( '**_Hello_**, _**world**_!' ) . toBeParsedAs ( [
285+ { type : 'syntax' , start : 0 , length : 2 } ,
286+ { type : 'bold' , start : 2 , length : 7 } ,
287+ { type : 'syntax' , start : 2 , length : 1 } ,
288+ { type : 'italic' , start : 3 , length : 5 } ,
290289 { type : 'syntax' , start : 8 , length : 1 } ,
291- { type : 'syntax' , start : 11 , length : 1 } ,
292- { type : 'italic' , start : 12 , length : 7 } ,
293- { type : 'syntax' , start : 12 , length : 1 } ,
294- { type : 'bold' , start : 13 , length : 5 } ,
295- { type : 'syntax' , start : 18 , length : 1 } ,
296- { type : 'syntax' , start : 19 , length : 1 } ,
290+ { type : 'syntax' , start : 9 , length : 2 } ,
291+ { type : 'syntax' , start : 13 , length : 1 } ,
292+ { type : 'italic' , start : 14 , length : 9 } ,
293+ { type : 'syntax' , start : 14 , length : 2 } ,
294+ { type : 'bold' , start : 16 , length : 5 } ,
295+ { type : 'syntax' , start : 21 , length : 2 } ,
296+ { type : 'syntax' , start : 23 , length : 1 } ,
297297 ] ) ;
298298} ) ;
299299
@@ -412,13 +412,13 @@ describe('trailing whitespace', () => {
412412 } ) ;
413413
414414 test ( 'with another style inside' , ( ) => {
415- expect ( '>> Hello *world*' ) . toBeParsedAs ( [
416- { type : 'blockquote' , start : 0 , length : 16 , depth : 2 } ,
415+ expect ( '>> Hello ** world* *' ) . toBeParsedAs ( [
416+ { type : 'blockquote' , start : 0 , length : 18 , depth : 2 } ,
417417 { type : 'syntax' , start : 0 , length : 1 } ,
418418 { type : 'syntax' , start : 1 , length : 1 } ,
419- { type : 'syntax' , start : 9 , length : 1 } ,
420- { type : 'bold' , start : 10 , length : 5 } ,
421- { type : 'syntax' , start : 15 , length : 1 } ,
419+ { type : 'syntax' , start : 9 , length : 2 } ,
420+ { type : 'bold' , start : 11 , length : 5 } ,
421+ { type : 'syntax' , start : 16 , length : 2 } ,
422422 ] ) ;
423423 } ) ;
424424 } ) ;
0 commit comments