diff --git a/src/rules.js b/src/rules.js index 39fa8e56c4..4f99615dd5 100644 --- a/src/rules.js +++ b/src/rules.js @@ -93,7 +93,7 @@ block.normal = merge({}, block); block.gfm = merge({}, block.normal, { table: '^ *([^\\n ].*\\|.*)\\n' // Header + ' {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?' // Align - + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells + + '(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells }); block.gfm.table = edit(block.gfm.table) diff --git a/test/specs/new/space_after_table.html b/test/specs/new/space_after_table.html new file mode 100644 index 0000000000..911d4aedea --- /dev/null +++ b/test/specs/new/space_after_table.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
ab
12
+ +

there should be a single space in the line above

diff --git a/test/specs/new/space_after_table.md b/test/specs/new/space_after_table.md new file mode 100644 index 0000000000..385ffe6229 --- /dev/null +++ b/test/specs/new/space_after_table.md @@ -0,0 +1,8 @@ +--- +gfm: true +--- +| a | b | +|---|---| +| 1 | 2 | + +there should be a single space in the line above \ No newline at end of file