File tree Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -312,16 +312,17 @@ export class _Lexer {
312
312
}
313
313
}
314
314
}
315
- // Mask out other blocks
316
- while ( ( match = this . tokenizer . rules . inline . blockSkip . exec ( maskedSrc ) ) != null ) {
317
- maskedSrc = maskedSrc . slice ( 0 , match . index ) + '[' + 'a' . repeat ( match [ 0 ] . length - 2 ) + ']' + maskedSrc . slice ( this . tokenizer . rules . inline . blockSkip . lastIndex ) ;
318
- }
319
315
320
316
// Mask out escaped characters
321
317
while ( ( match = this . tokenizer . rules . inline . anyPunctuation . exec ( maskedSrc ) ) != null ) {
322
318
maskedSrc = maskedSrc . slice ( 0 , match . index ) + '++' + maskedSrc . slice ( this . tokenizer . rules . inline . anyPunctuation . lastIndex ) ;
323
319
}
324
320
321
+ // Mask out other blocks
322
+ while ( ( match = this . tokenizer . rules . inline . blockSkip . exec ( maskedSrc ) ) != null ) {
323
+ maskedSrc = maskedSrc . slice ( 0 , match . index ) + '[' + 'a' . repeat ( match [ 0 ] . length - 2 ) + ']' + maskedSrc . slice ( this . tokenizer . rules . inline . blockSkip . lastIndex ) ;
324
+ }
325
+
325
326
let keepPrevChar = false ;
326
327
let prevChar = '' ;
327
328
while ( src ) {
Original file line number Diff line number Diff line change
1
+ < p > < em > italics</ em > </ p >
2
+ < p > < strong > bold</ strong > </ p >
3
+ < p > < em > < strong > bold italics</ strong > </ em > </ p >
4
+ < p > < code > *quoted italics*</ code > </ p >
5
+ < p > < code > **quoted bold**</ code > </ p >
6
+ < p > < code > ***quoted bold italics***</ code > </ p >
7
+ < p > `< em > escaped quoted italics</ em > `</ p >
8
+ < p > `< strong > escaped quoted bold</ strong > `</ p >
9
+ < p > `< em > < strong > escaped quoted bold italics</ strong > </ em > `</ p >
Original file line number Diff line number Diff line change
1
+ * italics*
2
+
3
+ ** bold**
4
+
5
+ *** bold italics***
6
+
7
+ ` *quoted italics* `
8
+
9
+ ` **quoted bold** `
10
+
11
+ ` ***quoted bold italics*** `
12
+
13
+ \` * escaped quoted italics* \`
14
+
15
+ \` ** escaped quoted bold** \`
16
+
17
+ \` *** escaped quoted bold italics*** \`
You can’t perform that action at this time.
0 commit comments