mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
update node modules
This commit is contained in:
23
node_modules/parse5/lib/extensions/location-info/parser-mixin.js
generated
vendored
23
node_modules/parse5/lib/extensions/location-info/parser-mixin.js
generated
vendored
@@ -43,17 +43,19 @@ class LocationInfoParserMixin extends Mixin {
|
||||
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
||||
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
||||
const isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && tn === closingToken.tagName;
|
||||
|
||||
const endLoc = {};
|
||||
if (isClosingEndTag) {
|
||||
loc.endTag = Object.assign({}, ctLoc);
|
||||
loc.endLine = ctLoc.endLine;
|
||||
loc.endCol = ctLoc.endCol;
|
||||
loc.endOffset = ctLoc.endOffset;
|
||||
endLoc.endTag = Object.assign({}, ctLoc);
|
||||
endLoc.endLine = ctLoc.endLine;
|
||||
endLoc.endCol = ctLoc.endCol;
|
||||
endLoc.endOffset = ctLoc.endOffset;
|
||||
} else {
|
||||
loc.endLine = ctLoc.startLine;
|
||||
loc.endCol = ctLoc.startCol;
|
||||
loc.endOffset = ctLoc.startOffset;
|
||||
endLoc.endLine = ctLoc.startLine;
|
||||
endLoc.endCol = ctLoc.startCol;
|
||||
endLoc.endOffset = ctLoc.startOffset;
|
||||
}
|
||||
|
||||
this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,9 +210,8 @@ class LocationInfoParserMixin extends Mixin {
|
||||
const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);
|
||||
|
||||
if (tnLoc) {
|
||||
tnLoc.endLine = token.location.endLine;
|
||||
tnLoc.endCol = token.location.endCol;
|
||||
tnLoc.endOffset = token.location.endOffset;
|
||||
const { endLine, endCol, endOffset } = token.location;
|
||||
this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });
|
||||
} else {
|
||||
this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);
|
||||
}
|
||||
|
2
node_modules/parse5/lib/parser/index.js
generated
vendored
2
node_modules/parse5/lib/parser/index.js
generated
vendored
@@ -1546,7 +1546,7 @@ function hrStartTagInBody(p, token) {
|
||||
|
||||
p._appendElement(token, NS.HTML);
|
||||
p.framesetOk = false;
|
||||
p.ackSelfClosing = true;
|
||||
token.ackSelfClosing = true;
|
||||
}
|
||||
|
||||
function imageStartTagInBody(p, token) {
|
||||
|
4
node_modules/parse5/lib/tree-adapters/default.js
generated
vendored
4
node_modules/parse5/lib/tree-adapters/default.js
generated
vendored
@@ -215,3 +215,7 @@ exports.setNodeSourceCodeLocation = function(node, location) {
|
||||
exports.getNodeSourceCodeLocation = function(node) {
|
||||
return node.sourceCodeLocation;
|
||||
};
|
||||
|
||||
exports.updateNodeSourceCodeLocation = function(node, endLocation) {
|
||||
node.sourceCodeLocation = Object.assign(node.sourceCodeLocation, endLocation);
|
||||
};
|
||||
|
22
node_modules/parse5/package.json
generated
vendored
22
node_modules/parse5/package.json
generated
vendored
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"_from": "parse5@5.1.1",
|
||||
"_id": "parse5@5.1.1",
|
||||
"_from": "parse5@6.0.1",
|
||||
"_id": "parse5@6.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
|
||||
"_integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
|
||||
"_location": "/parse5",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "parse5@5.1.1",
|
||||
"raw": "parse5@6.0.1",
|
||||
"name": "parse5",
|
||||
"escapedName": "parse5",
|
||||
"rawSpec": "5.1.1",
|
||||
"rawSpec": "6.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.1.1"
|
||||
"fetchSpec": "6.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/jsdom"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
|
||||
"_shasum": "f68e4e5ba1852ac2cadc00f4555fff6c2abb6178",
|
||||
"_spec": "parse5@5.1.1",
|
||||
"_resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
|
||||
"_shasum": "e1a1c085c569b3dc08321184f19a39cc27f7c30b",
|
||||
"_spec": "parse5@6.0.1",
|
||||
"_where": "D:\\Projects\\minifyfromhtml\\node_modules\\jsdom",
|
||||
"author": {
|
||||
"name": "Ivan Nikulin",
|
||||
@@ -37,7 +37,7 @@
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"gitHead": "9c7556ed05e4ff4d884ab2447e27ce3817c42e79",
|
||||
"gitHead": "37227a3429584903cbd1799dade995266fc2dbe6",
|
||||
"homepage": "https://github.com/inikulin/parse5",
|
||||
"keywords": [
|
||||
"html",
|
||||
@@ -63,5 +63,5 @@
|
||||
"type": "git",
|
||||
"url": "git://github.com/inikulin/parse5.git"
|
||||
},
|
||||
"version": "5.1.1"
|
||||
"version": "6.0.1"
|
||||
}
|
||||
|
Reference in New Issue
Block a user