From 6c22ae4e9e6d0b9fb7fe16e78ba208c5888f7f0d Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 11 Mar 2019 09:07:25 -0500 Subject: [PATCH] tables don't have to be top level --- lib/marked.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index f34e2df0..51faeffb 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -249,7 +249,7 @@ Lexer.prototype.token = function(src, top) { } // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { + if (cap = this.rules.nptable.exec(src)) { item = { type: 'table', header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), @@ -447,7 +447,7 @@ Lexer.prototype.token = function(src, top) { } // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { + if (cap = this.rules.table.exec(src)) { item = { type: 'table', header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')),