Skip to content

Commit 431f523

Browse files
committed
remove unneeded code
1 parent d8c09c1 commit 431f523

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/rules.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,15 @@ block.normal = merge({}, block);
9595
block.gfm = merge({}, block.normal, {
9696
nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header
9797
+ ' *([-:]+ *\\|[-| :]*)' // Align
98-
+ '(?:\\n((?:(?!\\n|hr|heading|lheading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
98+
+ '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
9999
table: '^ *\\|(.+)\\n' // Header
100100
+ ' *\\|?( *[-:]+[-| :]*)' // Align
101-
+ '(?:\\n *((?:(?!\\n|hr|heading|lheading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
101+
+ '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
102102
});
103103

104104
block.gfm.nptable = edit(block.gfm.nptable)
105105
.replace('hr', block.hr)
106106
.replace('heading', ' {0,3}#{1,6} ')
107-
// .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
108-
.replace('|lheading', '') // setex headings don't interrupt gfm tables
109107
.replace('blockquote', ' {0,3}>')
110108
.replace('code', ' {4}[^\\n]')
111109
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
@@ -117,8 +115,6 @@ block.gfm.nptable = edit(block.gfm.nptable)
117115
block.gfm.table = edit(block.gfm.table)
118116
.replace('hr', block.hr)
119117
.replace('heading', ' {0,3}#{1,6} ')
120-
// .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
121-
.replace('|lheading', '') // setex headings don't interrupt gfm tables
122118
.replace('blockquote', ' {0,3}>')
123119
.replace('code', ' {4}[^\\n]')
124120
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')

0 commit comments

Comments
 (0)