@@ -200,9 +200,7 @@ Lexer.prototype.token = function(src, top) {
200
200
l ,
201
201
isordered ,
202
202
istask ,
203
- ischecked ,
204
- blockquote ,
205
- count ;
203
+ ischecked ;
206
204
207
205
while ( src ) {
208
206
// newline
@@ -308,26 +306,16 @@ Lexer.prototype.token = function(src, top) {
308
306
type : 'blockquote_start'
309
307
} ) ;
310
308
311
- blockquote = cap [ 0 ] . replace ( / ^ * > ? / gm, '' ) ;
312
- count = 1 ;
313
- while ( blockquote . match ( / ^ { 0 , 3 } > / ) ) {
314
- count ++ ;
315
- this . tokens . push ( {
316
- type : 'blockquote_start'
317
- } ) ;
318
- blockquote = blockquote . replace ( / ^ * > ? / gm, '' ) ;
319
- }
309
+ cap = cap [ 0 ] . replace ( / ^ * > ? / gm, '' ) ;
320
310
321
311
// Pass `top` to keep the current
322
312
// "toplevel" state. This is exactly
323
313
// how markdown.pl works.
324
- this . token ( blockquote , top ) ;
314
+ this . token ( cap , top ) ;
325
315
326
- for ( i = 0 ; i < count ; i ++ ) {
327
- this . tokens . push ( {
328
- type : 'blockquote_end'
329
- } ) ;
330
- }
316
+ this . tokens . push ( {
317
+ type : 'blockquote_end'
318
+ } ) ;
331
319
332
320
continue ;
333
321
}
@@ -1253,27 +1241,13 @@ Parser.prototype.tok = function() {
1253
1241
return this . renderer . table ( header , body ) ;
1254
1242
}
1255
1243
case 'blockquote_start' : {
1256
- var count = 1 ;
1257
- while ( this . peek ( ) && this . peek ( ) . type === 'blockquote_start' ) {
1258
- this . next ( ) ;
1259
- count ++ ;
1260
- }
1261
-
1262
1244
body = '' ;
1263
1245
1264
1246
while ( this . next ( ) . type !== 'blockquote_end' ) {
1265
1247
body += this . tok ( ) ;
1266
1248
}
1267
1249
1268
- while ( this . peek ( ) && this . peek ( ) . type === 'blockquote_end' ) {
1269
- this . next ( ) ;
1270
- }
1271
-
1272
- for ( i = 0 ; i < count ; i ++ ) {
1273
- body = this . renderer . blockquote ( body ) ;
1274
- }
1275
-
1276
- return body ;
1250
+ return this . renderer . blockquote ( body ) ;
1277
1251
}
1278
1252
case 'list_start' : {
1279
1253
body = '' ;
0 commit comments