Skip to content

Commit

Permalink
tables don't have to be top level
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 11, 2019
1 parent afa14d6 commit 6c22ae4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '')),
Expand Down Expand Up @@ -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, '')),
Expand Down

0 comments on commit 6c22ae4

Please sign in to comment.