book-source 0.3.9 → 0.3.10
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.
|
@@ -1385,7 +1385,7 @@ function parseInline( str , ctx , blockEnd , trim = false ) {
|
|
|
1385
1385
|
|
|
1386
1386
|
function parseNestedInline( str , ctx , scanEnd , topLevel = false ) {
|
|
1387
1387
|
var isSpace ,
|
|
1388
|
-
|
|
1388
|
+
lastWasSpaceOrBegining = ! ctx.i || WHITE_SPACES.has( str[ ctx.i - 1 ] ) ;
|
|
1389
1389
|
|
|
1390
1390
|
//console.log( "parseInline() -- remaining:" , ctx.i , str.slice( ctx.i ) ) ;
|
|
1391
1391
|
|
|
@@ -1396,7 +1396,7 @@ function parseNestedInline( str , ctx , scanEnd , topLevel = false ) {
|
|
|
1396
1396
|
for ( ; ctx.i < scanEnd ; ctx.i ++ ) {
|
|
1397
1397
|
let char = str[ ctx.i ] ;
|
|
1398
1398
|
|
|
1399
|
-
//if (
|
|
1399
|
+
//if ( lastWasSpaceOrBegining ) {}
|
|
1400
1400
|
//console.error( "Checking: " , string.inspect( char ) ) ;
|
|
1401
1401
|
|
|
1402
1402
|
isSpace = WHITE_SPACES.has( char ) ;
|
|
@@ -1425,16 +1425,16 @@ function parseNestedInline( str , ctx , scanEnd , topLevel = false ) {
|
|
|
1425
1425
|
addInlineTextChunk( str , ctx ) ;
|
|
1426
1426
|
parseStyledText( str , ctx , scanEnd ) ;
|
|
1427
1427
|
}
|
|
1428
|
-
else if ( char === '?' && str[ ctx.i + 1 ] === '[' &&
|
|
1428
|
+
else if ( char === '?' && str[ ctx.i + 1 ] === '[' && lastWasSpaceOrBegining ) {
|
|
1429
1429
|
addInlineTextChunk( str , ctx ) ;
|
|
1430
1430
|
parseInfotipedText( str , ctx , scanEnd ) ;
|
|
1431
1431
|
}
|
|
1432
|
-
else if ( char === '!' && str[ ctx.i + 1 ] === '[' &&
|
|
1432
|
+
else if ( char === '!' && str[ ctx.i + 1 ] === '[' && lastWasSpaceOrBegining ) {
|
|
1433
1433
|
addInlineTextChunk( str , ctx ) ;
|
|
1434
1434
|
parseImage( str , ctx , scanEnd ) ;
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
1437
|
-
|
|
1437
|
+
lastWasSpaceOrBegining = isSpace ;
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
1440
|
addInlineTextChunk( str , ctx ) ;
|