Skip to content

Commit

Permalink
remove unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 9, 2020
1 parent d8c09c1 commit 431f523
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,15 @@ block.normal = merge({}, block);
block.gfm = merge({}, block.normal, {
nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header
+ ' *([-:]+ *\\|[-| :]*)' // Align
+ '(?:\\n((?:(?!\\n|hr|heading|lheading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
+ '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
table: '^ *\\|(.+)\\n' // Header
+ ' *\\|?( *[-:]+[-| :]*)' // Align
+ '(?:\\n *((?:(?!\\n|hr|heading|lheading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+ '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
});

block.gfm.nptable = edit(block.gfm.nptable)
.replace('hr', block.hr)
.replace('heading', ' {0,3}#{1,6} ')
// .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
.replace('|lheading', '') // setex headings don't interrupt gfm tables
.replace('blockquote', ' {0,3}>')
.replace('code', ' {4}[^\\n]')
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
Expand All @@ -117,8 +115,6 @@ block.gfm.nptable = edit(block.gfm.nptable)
block.gfm.table = edit(block.gfm.table)
.replace('hr', block.hr)
.replace('heading', ' {0,3}#{1,6} ')
// .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
.replace('|lheading', '') // setex headings don't interrupt gfm tables
.replace('blockquote', ' {0,3}>')
.replace('code', ' {4}[^\\n]')
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
Expand Down

0 comments on commit 431f523

Please sign in to comment.