node-html-parser 6.1.12 → 6.1.13
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/CHANGELOG.md +7 -0
- package/dist/main.js +5 -2
- package/dist/nodes/comment.d.ts +2 -1
- package/dist/nodes/comment.js +4 -2
- package/dist/nodes/node.d.ts +1 -0
- package/dist/nodes/text.d.ts +1 -0
- package/dist/nodes/text.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [6.1.13](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.12...v6.1.13) (2024-03-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add rawTagName [#269](https://github.com/taoqf/node-fast-html-parser/issues/269) [#270](https://github.com/taoqf/node-fast-html-parser/issues/270) ([9ac642d](https://github.com/taoqf/node-fast-html-parser/commit/9ac642d7b6a97c84fd4471b8eaa0bd9debf5e325))
|
|
11
|
+
|
|
5
12
|
### [6.1.12](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.11...v6.1.12) (2023-12-25)
|
|
6
13
|
|
|
7
14
|
|
package/dist/main.js
CHANGED
|
@@ -263,6 +263,7 @@ define("nodes/text", ["require", "exports", "he", "nodes/node", "nodes/type"], f
|
|
|
263
263
|
* @type {Number}
|
|
264
264
|
*/
|
|
265
265
|
_this.nodeType = type_2.default.TEXT_NODE;
|
|
266
|
+
_this.rawTagName = '';
|
|
266
267
|
_this._rawText = rawText;
|
|
267
268
|
return _this;
|
|
268
269
|
}
|
|
@@ -1558,10 +1559,12 @@ define("nodes/comment", ["require", "exports", "nodes/node", "nodes/type"], func
|
|
|
1558
1559
|
type_4 = __importDefault(type_4);
|
|
1559
1560
|
var CommentNode = /** @class */ (function (_super) {
|
|
1560
1561
|
__extends(CommentNode, _super);
|
|
1561
|
-
function CommentNode(rawText, parentNode, range) {
|
|
1562
|
+
function CommentNode(rawText, parentNode, range, rawTagName) {
|
|
1562
1563
|
if (parentNode === void 0) { parentNode = null; }
|
|
1564
|
+
if (rawTagName === void 0) { rawTagName = '!--'; }
|
|
1563
1565
|
var _this = _super.call(this, parentNode, range) || this;
|
|
1564
1566
|
_this.rawText = rawText;
|
|
1567
|
+
_this.rawTagName = rawTagName;
|
|
1565
1568
|
/**
|
|
1566
1569
|
* Node Type declaration.
|
|
1567
1570
|
* @type {Number}
|
|
@@ -1570,7 +1573,7 @@ define("nodes/comment", ["require", "exports", "nodes/node", "nodes/type"], func
|
|
|
1570
1573
|
return _this;
|
|
1571
1574
|
}
|
|
1572
1575
|
CommentNode.prototype.clone = function () {
|
|
1573
|
-
return new CommentNode(this.rawText, null);
|
|
1576
|
+
return new CommentNode(this.rawText, null, undefined, this.rawTagName);
|
|
1574
1577
|
};
|
|
1575
1578
|
Object.defineProperty(CommentNode.prototype, "text", {
|
|
1576
1579
|
/**
|
package/dist/nodes/comment.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import Node from './node';
|
|
|
3
3
|
import NodeType from './type';
|
|
4
4
|
export default class CommentNode extends Node {
|
|
5
5
|
rawText: string;
|
|
6
|
+
rawTagName: string;
|
|
6
7
|
clone(): CommentNode;
|
|
7
|
-
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number]);
|
|
8
|
+
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number], rawTagName?: string);
|
|
8
9
|
/**
|
|
9
10
|
* Node Type declaration.
|
|
10
11
|
* @type {Number}
|
package/dist/nodes/comment.js
CHANGED
|
@@ -22,10 +22,12 @@ var node_1 = __importDefault(require("./node"));
|
|
|
22
22
|
var type_1 = __importDefault(require("./type"));
|
|
23
23
|
var CommentNode = /** @class */ (function (_super) {
|
|
24
24
|
__extends(CommentNode, _super);
|
|
25
|
-
function CommentNode(rawText, parentNode, range) {
|
|
25
|
+
function CommentNode(rawText, parentNode, range, rawTagName) {
|
|
26
26
|
if (parentNode === void 0) { parentNode = null; }
|
|
27
|
+
if (rawTagName === void 0) { rawTagName = '!--'; }
|
|
27
28
|
var _this = _super.call(this, parentNode, range) || this;
|
|
28
29
|
_this.rawText = rawText;
|
|
30
|
+
_this.rawTagName = rawTagName;
|
|
29
31
|
/**
|
|
30
32
|
* Node Type declaration.
|
|
31
33
|
* @type {Number}
|
|
@@ -34,7 +36,7 @@ var CommentNode = /** @class */ (function (_super) {
|
|
|
34
36
|
return _this;
|
|
35
37
|
}
|
|
36
38
|
CommentNode.prototype.clone = function () {
|
|
37
|
-
return new CommentNode(this.rawText, null);
|
|
39
|
+
return new CommentNode(this.rawText, null, undefined, this.rawTagName);
|
|
38
40
|
};
|
|
39
41
|
Object.defineProperty(CommentNode.prototype, "text", {
|
|
40
42
|
/**
|
package/dist/nodes/node.d.ts
CHANGED
package/dist/nodes/text.d.ts
CHANGED
package/dist/nodes/text.js
CHANGED
package/package.json
CHANGED