fix indented tables to act like gfm
This commit is contained in:
parent
902a9273e1
commit
2e99532bbd
@ -94,10 +94,10 @@ block.normal = merge({}, block);
|
||||
|
||||
block.gfm = merge({}, block.normal, {
|
||||
nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header
|
||||
+ ' *([-:]+ *\\|[-| :]*)' // Align
|
||||
+ ' {0,3}([-:]+ *\\|[-| :]*)' // Align
|
||||
+ '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
|
||||
table: '^ *\\|(.+)\\n' // Header
|
||||
+ ' *\\|?( *[-:]+[-| :]*)' // Align
|
||||
+ ' {0,3}\\|?( *[-:]+[-| :]*)' // Align
|
||||
+ '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
|
||||
});
|
||||
|
||||
|
6
test/specs/new/indented_tables.html
Normal file
6
test/specs/new/indented_tables.html
Normal file
@ -0,0 +1,6 @@
|
||||
<p>
|
||||
| abc | def |
|
||||
| --- | --- |
|
||||
| bar | foo |
|
||||
| baz | boo |
|
||||
</p>
|
4
test/specs/new/indented_tables.md
Normal file
4
test/specs/new/indented_tables.md
Normal file
@ -0,0 +1,4 @@
|
||||
| abc | def |
|
||||
| --- | --- |
|
||||
| bar | foo |
|
||||
| baz | boo |
|
Loading…
x
Reference in New Issue
Block a user