hyperdown 2.4.29 → 2.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Parser.js CHANGED
@@ -583,7 +583,7 @@
583
583
 
584
584
  parseBlockTable(block, key, line, state, lines) {
585
585
  var align, aligns, head, j, len, matches, row, rows;
586
- if (!!(matches = line.match(/^((?:(?:(?:\||\+)(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:[ :]*\-+[ :]*)(?:\||\+)(?:[ :]*\-+[ :]*))|(?:(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:\||\+)(?:[ :]*\-+[ :]*)))+)$/))) {
586
+ if (!!(matches = line.match(/^\s*(\|?[ :]*-+[ :]*(?:\|[ :]*-+[ :]*)*\|?)\s*$/))) {
587
587
  if (this.isBlock('table')) {
588
588
  block[3][0].push(block[3][2]);
589
589
  block[3][2] += 1;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "BSD-4-Clause",
9
9
  "author": "SegmentFault",
10
- "version": "2.4.29",
10
+ "version": "2.4.30",
11
11
  "scripts": {
12
12
  "test": "mocha",
13
13
  "build": "cake build"
package/src/Parser.coffee CHANGED
@@ -613,7 +613,7 @@ class Parser
613
613
 
614
614
 
615
615
  parseBlockTable: (block, key, line, state, lines) ->
616
- if !!(matches = line.match /^((?:(?:(?:\||\+)(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:[ :]*\-+[ :]*)(?:\||\+)(?:[ :]*\-+[ :]*))|(?:(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:\||\+)(?:[ :]*\-+[ :]*)))+)$/)
616
+ if !!(matches = line.match /^\s*(\|?[ :]*-+[ :]*(?:\|[ :]*-+[ :]*)*\|?)\s*$/)
617
617
  if @isBlock 'table'
618
618
  block[3][0].push block[3][2]
619
619
  block[3][2] += 1