Skip to content

Commit

Permalink
move tables to gfm
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Jul 1, 2019
1 parent 8ccc1f1 commit f478dfb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,15 @@ block.normal = merge({}, block);
*/

block.gfm = merge({}, block.normal, {
nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
});

/**
* GFM + Tables Block Grammar
*/

block.tables = merge({}, block.gfm, {
nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
});
block.tables = merge({}, block.gfm);

/**
* Pedantic grammar
Expand Down

0 comments on commit f478dfb

Please sign in to comment.