ecmarkdown
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -12,3 +12,5 @@ 'use strict'; | ||
return doc[0].contents.map(emit).join(''); | ||
return doc.reduce(function (arr, para) { | ||
return arr.concat(para.contents, { name: 'text', contents: ' ' }); | ||
}, []).map(emit).join(''); | ||
}; | ||
@@ -15,0 +17,0 @@ |
@@ -27,2 +27,8 @@ 'use strict'; | ||
// consume leading whitespace | ||
if (tok.name === 'parabreak' || tok.name === 'linebreak') { | ||
this._t.next(); | ||
continue; | ||
} | ||
graphs.push(this.parseParagraph()); | ||
@@ -172,3 +178,3 @@ | ||
if (tok.name === 'EOF') { | ||
if (tok.name === 'EOF' || tok.name === 'parabreak') { | ||
break; | ||
@@ -175,0 +181,0 @@ } |
@@ -179,2 +179,4 @@ 'use strict'; | ||
case '\n': | ||
this._newline = true; | ||
if (str[this.pos + 1] === '\n') { | ||
@@ -185,3 +187,2 @@ this.pos += 2; | ||
this.pos += 1; | ||
this._newline = true; | ||
this.enqueue({ name: 'linebreak', contents: '\n' }); | ||
@@ -188,0 +189,0 @@ } |
{ | ||
"name": "ecmarkdown", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "A compiler for \"Ecmarkdown\" algorithm shorthand into HTML.", | ||
@@ -5,0 +5,0 @@ "main": "lib/ecmarkdown.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25629
576