htmljs-parser 5.0.0 → 5.0.1
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 +5 -0
- package/dist/index.mjs +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -727,6 +727,7 @@ var CLOSE_TAG = {
|
|
|
727
727
|
}
|
|
728
728
|
};
|
|
729
729
|
function checkForClosingTag(parser) {
|
|
730
|
+
var _a, _b;
|
|
730
731
|
const curPos = parser.pos + 1;
|
|
731
732
|
let match = !!parser.lookAheadFor("/>");
|
|
732
733
|
let skip = 3;
|
|
@@ -743,6 +744,10 @@ function checkForClosingTag(parser) {
|
|
|
743
744
|
}
|
|
744
745
|
if (match) {
|
|
745
746
|
parser.endText();
|
|
747
|
+
(_b = (_a = parser.options).onCloseTagStart) == null ? void 0 : _b.call(_a, {
|
|
748
|
+
start: curPos - 1,
|
|
749
|
+
end: curPos + 1
|
|
750
|
+
});
|
|
746
751
|
if (ensureExpectedCloseTag(parser, {
|
|
747
752
|
start: parser.pos,
|
|
748
753
|
end: parser.pos += skip
|
package/dist/index.mjs
CHANGED
|
@@ -706,6 +706,7 @@ var CLOSE_TAG = {
|
|
|
706
706
|
}
|
|
707
707
|
};
|
|
708
708
|
function checkForClosingTag(parser) {
|
|
709
|
+
var _a, _b;
|
|
709
710
|
const curPos = parser.pos + 1;
|
|
710
711
|
let match = !!parser.lookAheadFor("/>");
|
|
711
712
|
let skip = 3;
|
|
@@ -722,6 +723,10 @@ function checkForClosingTag(parser) {
|
|
|
722
723
|
}
|
|
723
724
|
if (match) {
|
|
724
725
|
parser.endText();
|
|
726
|
+
(_b = (_a = parser.options).onCloseTagStart) == null ? void 0 : _b.call(_a, {
|
|
727
|
+
start: curPos - 1,
|
|
728
|
+
end: curPos + 1
|
|
729
|
+
});
|
|
725
730
|
if (ensureExpectedCloseTag(parser, {
|
|
726
731
|
start: parser.pos,
|
|
727
732
|
end: parser.pos += skip
|
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.0.
|
|
4
|
+
"version": "5.0.1",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@changesets/changelog-github": "^0.4.4",
|
|
7
7
|
"@changesets/cli": "^2.22.0",
|