htmljs-parser 5.1.3 → 5.1.5
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/README.md +1 -1
- package/dist/index.js +2 -16
- package/dist/index.mjs +2 -16
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -132,22 +132,7 @@ function getPosAfterLine(lines, startLine, index) {
|
|
|
132
132
|
var Parser = class {
|
|
133
133
|
constructor(options) {
|
|
134
134
|
this.options = options;
|
|
135
|
-
this.options = options;
|
|
136
135
|
}
|
|
137
|
-
pos;
|
|
138
|
-
maxPos;
|
|
139
|
-
data;
|
|
140
|
-
activeState;
|
|
141
|
-
activeRange;
|
|
142
|
-
forward;
|
|
143
|
-
activeTag;
|
|
144
|
-
activeAttr;
|
|
145
|
-
indent;
|
|
146
|
-
isConcise;
|
|
147
|
-
beginMixedMode;
|
|
148
|
-
endingMixedModeAtEOL;
|
|
149
|
-
textPos;
|
|
150
|
-
lines;
|
|
151
136
|
read(range) {
|
|
152
137
|
return this.data.slice(range.start, range.end);
|
|
153
138
|
}
|
|
@@ -966,7 +951,7 @@ function shouldTerminateHtmlAttrValue(code, data, pos) {
|
|
|
966
951
|
case 47 /* FORWARD_SLASH */:
|
|
967
952
|
return data.charCodeAt(pos + 1) === 62 /* CLOSE_ANGLE_BRACKET */;
|
|
968
953
|
case 62 /* CLOSE_ANGLE_BRACKET */:
|
|
969
|
-
return data.charCodeAt(pos - 1) !== 61 /* EQUAL */;
|
|
954
|
+
return pos === this.start || data.charCodeAt(pos - 1) !== 61 /* EQUAL */;
|
|
970
955
|
default:
|
|
971
956
|
return false;
|
|
972
957
|
}
|
|
@@ -1555,6 +1540,7 @@ var EXPRESSION = {
|
|
|
1555
1540
|
default: {
|
|
1556
1541
|
if (canFollowDivision(this.getPreviousNonWhitespaceCharCode())) {
|
|
1557
1542
|
this.pos++;
|
|
1543
|
+
this.forward = 0;
|
|
1558
1544
|
this.consumeWhitespace();
|
|
1559
1545
|
} else {
|
|
1560
1546
|
this.enterState(states_exports.REGULAR_EXPRESSION);
|
package/dist/index.mjs
CHANGED
|
@@ -107,22 +107,7 @@ function getPosAfterLine(lines, startLine, index) {
|
|
|
107
107
|
var Parser = class {
|
|
108
108
|
constructor(options) {
|
|
109
109
|
this.options = options;
|
|
110
|
-
this.options = options;
|
|
111
110
|
}
|
|
112
|
-
pos;
|
|
113
|
-
maxPos;
|
|
114
|
-
data;
|
|
115
|
-
activeState;
|
|
116
|
-
activeRange;
|
|
117
|
-
forward;
|
|
118
|
-
activeTag;
|
|
119
|
-
activeAttr;
|
|
120
|
-
indent;
|
|
121
|
-
isConcise;
|
|
122
|
-
beginMixedMode;
|
|
123
|
-
endingMixedModeAtEOL;
|
|
124
|
-
textPos;
|
|
125
|
-
lines;
|
|
126
111
|
read(range) {
|
|
127
112
|
return this.data.slice(range.start, range.end);
|
|
128
113
|
}
|
|
@@ -941,7 +926,7 @@ function shouldTerminateHtmlAttrValue(code, data, pos) {
|
|
|
941
926
|
case 47 /* FORWARD_SLASH */:
|
|
942
927
|
return data.charCodeAt(pos + 1) === 62 /* CLOSE_ANGLE_BRACKET */;
|
|
943
928
|
case 62 /* CLOSE_ANGLE_BRACKET */:
|
|
944
|
-
return data.charCodeAt(pos - 1) !== 61 /* EQUAL */;
|
|
929
|
+
return pos === this.start || data.charCodeAt(pos - 1) !== 61 /* EQUAL */;
|
|
945
930
|
default:
|
|
946
931
|
return false;
|
|
947
932
|
}
|
|
@@ -1530,6 +1515,7 @@ var EXPRESSION = {
|
|
|
1530
1515
|
default: {
|
|
1531
1516
|
if (canFollowDivision(this.getPreviousNonWhitespaceCharCode())) {
|
|
1532
1517
|
this.pos++;
|
|
1518
|
+
this.forward = 0;
|
|
1533
1519
|
this.consumeWhitespace();
|
|
1534
1520
|
} else {
|
|
1535
1521
|
this.enterState(states_exports.REGULAR_EXPRESSION);
|
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.1.
|
|
4
|
+
"version": "5.1.5",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@changesets/changelog-github": "^0.4.6",
|
|
7
7
|
"@changesets/cli": "^2.24.1",
|