node-html-parser
Advanced tools
Comparing version 6.1.12 to 6.1.13
@@ -5,2 +5,9 @@ # Changelog | ||
### [6.1.13](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.12...v6.1.13) (2024-03-29) | ||
### Bug Fixes | ||
* 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)) | ||
### [6.1.12](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.11...v6.1.12) (2023-12-25) | ||
@@ -7,0 +14,0 @@ |
@@ -6,4 +6,5 @@ import HTMLElement from './html'; | ||
rawText: string; | ||
rawTagName: string; | ||
clone(): CommentNode; | ||
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number]); | ||
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number], rawTagName?: string); | ||
/** | ||
@@ -10,0 +11,0 @@ * Node Type declaration. |
@@ -25,6 +25,8 @@ "use strict"; | ||
__extends(CommentNode, _super); | ||
function CommentNode(rawText, parentNode, range) { | ||
function CommentNode(rawText, parentNode, range, rawTagName) { | ||
if (parentNode === void 0) { parentNode = null; } | ||
if (rawTagName === void 0) { rawTagName = '!--'; } | ||
var _this = _super.call(this, parentNode, range) || this; | ||
_this.rawText = rawText; | ||
_this.rawTagName = rawTagName; | ||
/** | ||
@@ -38,3 +40,3 @@ * Node Type declaration. | ||
CommentNode.prototype.clone = function () { | ||
return new CommentNode(this.rawText, null); | ||
return new CommentNode(this.rawText, null, undefined, this.rawTagName); | ||
}; | ||
@@ -41,0 +43,0 @@ Object.defineProperty(CommentNode.prototype, "text", { |
@@ -8,2 +8,3 @@ import NodeType from './type'; | ||
parentNode: HTMLElement; | ||
abstract rawTagName: string; | ||
abstract nodeType: NodeType; | ||
@@ -10,0 +11,0 @@ childNodes: Node[]; |
@@ -16,2 +16,3 @@ import HTMLElement from './html'; | ||
nodeType: NodeType; | ||
rawTagName: string; | ||
private _rawText; | ||
@@ -18,0 +19,0 @@ private _trimmedRawText?; |
@@ -38,2 +38,3 @@ "use strict"; | ||
_this.nodeType = type_1.default.TEXT_NODE; | ||
_this.rawTagName = ''; | ||
_this._rawText = rawText; | ||
@@ -40,0 +41,0 @@ return _this; |
{ | ||
"name": "node-html-parser", | ||
"version": "6.1.12", | ||
"version": "6.1.13", | ||
"description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165463
3694