htmljs-parser 5.2.2 → 5.2.4

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
@@ -780,6 +780,8 @@ function shouldTerminateConciseTagVar(code, data, pos) {
780
780
  case 59 /* SEMICOLON */:
781
781
  case 60 /* OPEN_ANGLE_BRACKET */:
782
782
  return true;
783
+ case 45 /* HYPHEN */:
784
+ return data.charCodeAt(pos + 1) === 45 /* HYPHEN */;
783
785
  case 58 /* COLON */:
784
786
  return data.charCodeAt(pos + 1) === 61 /* EQUAL */;
785
787
  default:
@@ -2136,8 +2138,12 @@ var INLINE_SCRIPT = {
2136
2138
  }
2137
2139
  },
2138
2140
  return(child, inlineScript) {
2139
- if (inlineScript.block)
2141
+ if (inlineScript.block) {
2140
2142
  this.pos++;
2143
+ if (this.lookAtCharCodeAhead(0) === 59 /* SEMICOLON */ || this.consumeWhitespaceIfBefore(";")) {
2144
+ this.pos++;
2145
+ }
2146
+ }
2141
2147
  inlineScript.value.start = child.start;
2142
2148
  inlineScript.value.end = child.end;
2143
2149
  this.exitState();
package/dist/index.mjs CHANGED
@@ -755,6 +755,8 @@ function shouldTerminateConciseTagVar(code, data, pos) {
755
755
  case 59 /* SEMICOLON */:
756
756
  case 60 /* OPEN_ANGLE_BRACKET */:
757
757
  return true;
758
+ case 45 /* HYPHEN */:
759
+ return data.charCodeAt(pos + 1) === 45 /* HYPHEN */;
758
760
  case 58 /* COLON */:
759
761
  return data.charCodeAt(pos + 1) === 61 /* EQUAL */;
760
762
  default:
@@ -2111,8 +2113,12 @@ var INLINE_SCRIPT = {
2111
2113
  }
2112
2114
  },
2113
2115
  return(child, inlineScript) {
2114
- if (inlineScript.block)
2116
+ if (inlineScript.block) {
2115
2117
  this.pos++;
2118
+ if (this.lookAtCharCodeAhead(0) === 59 /* SEMICOLON */ || this.consumeWhitespaceIfBefore(";")) {
2119
+ this.pos++;
2120
+ }
2121
+ }
2116
2122
  inlineScript.value.start = child.start;
2117
2123
  inlineScript.value.end = child.end;
2118
2124
  this.exitState();
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.2.2",
4
+ "version": "5.2.4",
5
5
  "devDependencies": {
6
6
  "@changesets/changelog-github": "^0.4.7",
7
7
  "@changesets/cli": "^2.25.2",