mirror of
https://github.com/markedjs/marked.git
synced 2026-12-01 16:56:16 +01:00
fix indented tables to act like gfm
This commit is contained in:
+2
-2
@@ -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
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<p>
|
||||
| abc | def |
|
||||
| --- | --- |
|
||||
| bar | foo |
|
||||
| baz | boo |
|
||||
</p>
|
||||
@@ -0,0 +1,4 @@
|
||||
| abc | def |
|
||||
| --- | --- |
|
||||
| bar | foo |
|
||||
| baz | boo |
|
||||
Reference in New Issue
Block a user