htmljs-parser 5.6.0 → 5.6.2

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/dist/index.js CHANGED
@@ -1195,7 +1195,6 @@ function handleDelimitedBlockEOL(parser, newLineLength, {
1195
1195
  parser.endText();
1196
1196
  parser.pos += endHtmlBlockLookahead.length;
1197
1197
  if (parser.consumeWhitespaceOnLine(0)) {
1198
- parser.endText();
1199
1198
  parser.exitState();
1200
1199
  parser.exitState();
1201
1200
  } else {
@@ -1212,7 +1211,7 @@ function handleDelimitedBlockEOL(parser, newLineLength, {
1212
1211
  parser.endText();
1213
1212
  parser.exitState();
1214
1213
  parser.exitState();
1215
- } else {
1214
+ } else if (parser.pos + newLineLength !== parser.maxPos) {
1216
1215
  parser.startText();
1217
1216
  }
1218
1217
  }
@@ -1744,7 +1743,7 @@ var EXPRESSION = {
1744
1743
  }
1745
1744
  },
1746
1745
  eol(len, expression) {
1747
- if (!expression.groupStack.length && (expression.terminatedByEOL || expression.terminatedByWhitespace) && (expression.wasComment || !checkForOperators(this, expression, true)) && !(expression.consumeIndentedContent && isIndentCode(this.lookAtCharCodeAhead(len + 1)))) {
1746
+ if (!expression.groupStack.length && (expression.terminatedByEOL || expression.terminatedByWhitespace) && (expression.wasComment || !checkForOperators(this, expression, true)) && !(expression.consumeIndentedContent && isIndentCode(this.lookAtCharCodeAhead(len)))) {
1748
1747
  this.exitState();
1749
1748
  }
1750
1749
  expression.wasComment = false;
package/dist/index.mjs CHANGED
@@ -1170,7 +1170,6 @@ function handleDelimitedBlockEOL(parser, newLineLength, {
1170
1170
  parser.endText();
1171
1171
  parser.pos += endHtmlBlockLookahead.length;
1172
1172
  if (parser.consumeWhitespaceOnLine(0)) {
1173
- parser.endText();
1174
1173
  parser.exitState();
1175
1174
  parser.exitState();
1176
1175
  } else {
@@ -1187,7 +1186,7 @@ function handleDelimitedBlockEOL(parser, newLineLength, {
1187
1186
  parser.endText();
1188
1187
  parser.exitState();
1189
1188
  parser.exitState();
1190
- } else {
1189
+ } else if (parser.pos + newLineLength !== parser.maxPos) {
1191
1190
  parser.startText();
1192
1191
  }
1193
1192
  }
@@ -1719,7 +1718,7 @@ var EXPRESSION = {
1719
1718
  }
1720
1719
  },
1721
1720
  eol(len, expression) {
1722
- if (!expression.groupStack.length && (expression.terminatedByEOL || expression.terminatedByWhitespace) && (expression.wasComment || !checkForOperators(this, expression, true)) && !(expression.consumeIndentedContent && isIndentCode(this.lookAtCharCodeAhead(len + 1)))) {
1721
+ if (!expression.groupStack.length && (expression.terminatedByEOL || expression.terminatedByWhitespace) && (expression.wasComment || !checkForOperators(this, expression, true)) && !(expression.consumeIndentedContent && isIndentCode(this.lookAtCharCodeAhead(len)))) {
1723
1722
  this.exitState();
1724
1723
  }
1725
1724
  expression.wasComment = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "htmljs-parser",
3
3
  "description": "An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values",
4
- "version": "5.6.0",
4
+ "version": "5.6.2",
5
5
  "devDependencies": {
6
6
  "@changesets/changelog-github": "^0.5.0",
7
7
  "@changesets/cli": "^2.27.1",