htmljs-parser 5.2.1 → 5.2.3

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
@@ -1842,7 +1842,7 @@ function lookAheadForOperator(data, pos) {
1842
1842
  if (nextPos === max)
1843
1843
  return -1;
1844
1844
  nextCode = data.charCodeAt(nextPos);
1845
- } else if (isWordCode(nextCode)) {
1845
+ } else {
1846
1846
  return -1;
1847
1847
  }
1848
1848
  switch (nextCode) {
@@ -2136,8 +2136,12 @@ var INLINE_SCRIPT = {
2136
2136
  }
2137
2137
  },
2138
2138
  return(child, inlineScript) {
2139
- if (inlineScript.block)
2139
+ if (inlineScript.block) {
2140
2140
  this.pos++;
2141
+ if (this.lookAtCharCodeAhead(0) === 59 /* SEMICOLON */ || this.consumeWhitespaceIfBefore(";")) {
2142
+ this.pos++;
2143
+ }
2144
+ }
2141
2145
  inlineScript.value.start = child.start;
2142
2146
  inlineScript.value.end = child.end;
2143
2147
  this.exitState();
package/dist/index.mjs CHANGED
@@ -1817,7 +1817,7 @@ function lookAheadForOperator(data, pos) {
1817
1817
  if (nextPos === max)
1818
1818
  return -1;
1819
1819
  nextCode = data.charCodeAt(nextPos);
1820
- } else if (isWordCode(nextCode)) {
1820
+ } else {
1821
1821
  return -1;
1822
1822
  }
1823
1823
  switch (nextCode) {
@@ -2111,8 +2111,12 @@ var INLINE_SCRIPT = {
2111
2111
  }
2112
2112
  },
2113
2113
  return(child, inlineScript) {
2114
- if (inlineScript.block)
2114
+ if (inlineScript.block) {
2115
2115
  this.pos++;
2116
+ if (this.lookAtCharCodeAhead(0) === 59 /* SEMICOLON */ || this.consumeWhitespaceIfBefore(";")) {
2117
+ this.pos++;
2118
+ }
2119
+ }
2116
2120
  inlineScript.value.start = child.start;
2117
2121
  inlineScript.value.end = child.end;
2118
2122
  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.1",
4
+ "version": "5.2.3",
5
5
  "devDependencies": {
6
6
  "@changesets/changelog-github": "^0.4.7",
7
7
  "@changesets/cli": "^2.25.2",