ecmarkdown
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -102,2 +102,7 @@ "use strict"; | ||
else if (tok.name === 'parabreak') { | ||
if (this._t.peek(2).name === 'EOF') { | ||
this.pushPos(); | ||
this._t.next(); | ||
pushOrJoin(frag, this.finish({ name: 'text', contents: tok.contents })); | ||
} | ||
break; | ||
@@ -104,0 +109,0 @@ } |
@@ -232,10 +232,16 @@ "use strict"; | ||
this._newline = true; | ||
if (str[this.pos + 1] === '\n') { | ||
this.pos += 2; | ||
this.enqueue({ name: 'parabreak', contents: '\n\n' }, start); | ||
{ | ||
const pos = this.pos; | ||
let nextPos = pos + 1; | ||
while (nextPos < str.length && str[nextPos] === '\n') { | ||
nextPos++; | ||
} | ||
this.pos = nextPos; | ||
if (nextPos === pos + 1) { | ||
this.enqueue({ name: 'linebreak', contents: '\n' }, start); | ||
} | ||
else { | ||
this.enqueue({ name: 'parabreak', contents: str.slice(pos, nextPos) }, start); | ||
} | ||
} | ||
else { | ||
this.pos += 1; | ||
this.enqueue({ name: 'linebreak', contents: '\n' }, start); | ||
} | ||
return; | ||
@@ -335,4 +341,5 @@ default: | ||
else if (tok.name === 'parabreak') { | ||
let size = tok.contents.length; | ||
this.column = 0; | ||
this.line += 2; | ||
this.line += size; | ||
} | ||
@@ -339,0 +346,0 @@ else { |
{ | ||
"name": "ecmarkdown", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "A compiler for \"Ecmarkdown\" algorithm shorthand into HTML.", | ||
@@ -5,0 +5,0 @@ "main": "dist/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
49269
1173