| 1242 | return ((this.inlineQueue = []), this.tokens); |
| 1243 | } |
| 1244 | blockTokens(e, t = [], n = !1) { |
| 1245 | for ( |
| 1246 | this.options.pedantic && |
| 1247 | (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); |
| 1248 | e; |
| 1249 | ) { |
| 1250 | let s; |
| 1251 | if ( |
| 1252 | this.options.extensions?.block?.some((r) => |
| 1253 | (s = r.call({ lexer: this }, e, t)) |
| 1254 | ? ((e = e.substring(s.raw.length)), t.push(s), !0) |
| 1255 | : !1, |
| 1256 | ) |
| 1257 | ) |
| 1258 | continue; |
| 1259 | if ((s = this.tokenizer.space(e))) { |
| 1260 | e = e.substring(s.raw.length); |
| 1261 | let r = t.at(-1); |
| 1262 | s.raw.length === 1 && r !== void 0 |
| 1263 | ? (r.raw += ` |
| 1264 | `) |
| 1265 | : t.push(s); |
| 1266 | continue; |
| 1267 | } |
| 1268 | if ((s = this.tokenizer.code(e))) { |
| 1269 | e = e.substring(s.raw.length); |
| 1270 | let r = t.at(-1); |
| 1271 | r?.type === "paragraph" || r?.type === "text" |
| 1272 | ? ((r.raw += |
| 1273 | ` |
| 1274 | ` + s.raw), |
| 1275 | (r.text += |
| 1276 | ` |
| 1277 | ` + s.text), |
| 1278 | (this.inlineQueue.at(-1).src = r.text)) |
| 1279 | : t.push(s); |
| 1280 | continue; |
| 1281 | } |
| 1282 | if ((s = this.tokenizer.fences(e))) { |
| 1283 | ((e = e.substring(s.raw.length)), t.push(s)); |
| 1284 | continue; |
| 1285 | } |
| 1286 | if ((s = this.tokenizer.heading(e))) { |
| 1287 | ((e = e.substring(s.raw.length)), t.push(s)); |
| 1288 | continue; |
| 1289 | } |
| 1290 | if ((s = this.tokenizer.hr(e))) { |
| 1291 | ((e = e.substring(s.raw.length)), t.push(s)); |
| 1292 | continue; |
| 1293 | } |
| 1294 | if ((s = this.tokenizer.blockquote(e))) { |
| 1295 | ((e = e.substring(s.raw.length)), t.push(s)); |
| 1296 | continue; |
| 1297 | } |
| 1298 | if ((s = this.tokenizer.list(e))) { |
| 1299 | ((e = e.substring(s.raw.length)), t.push(s)); |
| 1300 | continue; |
| 1301 | } |