From eb21a0a9c188a3ccd0aacdb9f4acfde418ced30f Mon Sep 17 00:00:00 2001 From: xiaohaoliang Date: Thu, 6 Sep 2018 16:19:30 +0800 Subject: [PATCH 1/2] Rendering the table in list---47issue --- lib/lex/block.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lex/block.js b/lib/lex/block.js index 96fc6f6..7ab46cb 100644 --- a/lib/lex/block.js +++ b/lib/lex/block.js @@ -141,7 +141,7 @@ Lexer.prototype.token = function(src, top, bq) { } // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { + if (cap = this.rules.nptable.exec(src)) { src = src.substring(cap[0].length); item = { @@ -346,7 +346,7 @@ Lexer.prototype.token = function(src, top, bq) { } // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { + if (cap = this.rules.paragraph.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'paragraph', From 8d8c74f3e488ce869a75e14cfded6de5d3e71f0e Mon Sep 17 00:00:00 2001 From: xiaohaoliang Date: Thu, 6 Sep 2018 16:32:27 +0800 Subject: [PATCH 2/2] Rendering the table in list---47issue --- lib/lex/block.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lex/block.js b/lib/lex/block.js index 7ab46cb..c5fa279 100644 --- a/lib/lex/block.js +++ b/lib/lex/block.js @@ -312,7 +312,7 @@ Lexer.prototype.token = function(src, top, bq) { } // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { + if (cap = this.rules.table.exec(src)) { src = src.substring(cap[0].length); item = { @@ -346,7 +346,7 @@ Lexer.prototype.token = function(src, top, bq) { } // top-level paragraph - if (cap = this.rules.paragraph.exec(src)) { + if (top && (cap = this.rules.paragraph.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'paragraph',