node-html-parser
Advanced tools
Comparing version 6.1.5 to 6.1.6
@@ -5,2 +5,15 @@ # Changelog | ||
### [6.1.6](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.5...v6.1.6) (2023-08-17) | ||
### Bug Fixes | ||
* [#203](https://github.com/taoqf/node-fast-html-parser/issues/203) ([6006c52](https://github.com/taoqf/node-fast-html-parser/commit/6006c52c20e6c3c07405c808c8d81fa78425e794)) | ||
* [#218](https://github.com/taoqf/node-fast-html-parser/issues/218) ([6f6c824](https://github.com/taoqf/node-fast-html-parser/commit/6f6c824df54fa53af47956048b42ea47cd3b53bf)) | ||
* add tests for issue [#242](https://github.com/taoqf/node-fast-html-parser/issues/242) ([7615e27](https://github.com/taoqf/node-fast-html-parser/commit/7615e27e3eea47142beff11101d293c4f93cb6ce)) | ||
* do not decode special chractors [#240](https://github.com/taoqf/node-fast-html-parser/issues/240) ([cdadb13](https://github.com/taoqf/node-fast-html-parser/commit/cdadb132f681ca587d17df991d09ff8d22997f4e)) | ||
* improve constructor types [#230](https://github.com/taoqf/node-fast-html-parser/issues/230) ([24fd055](https://github.com/taoqf/node-fast-html-parser/commit/24fd055913125a964cb5aa61330376274c938035)) | ||
* more change about types [#230](https://github.com/taoqf/node-fast-html-parser/issues/230) ([2852d20](https://github.com/taoqf/node-fast-html-parser/commit/2852d20f865dc18a8dc6727d5b5e586282e7d50d)) | ||
* remove test code ([f0b176e](https://github.com/taoqf/node-fast-html-parser/commit/f0b176eb1ba5b5bc162744a37adcd18d3d64a515)) | ||
### [6.1.5](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.4...v6.1.5) (2023-02-21) | ||
@@ -7,0 +20,0 @@ |
@@ -7,3 +7,3 @@ import HTMLElement from './html'; | ||
clone(): CommentNode; | ||
constructor(rawText: string, parentNode: HTMLElement, range?: [number, number]); | ||
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number]); | ||
/** | ||
@@ -10,0 +10,0 @@ * Node Type declaration. |
@@ -26,2 +26,3 @@ "use strict"; | ||
function CommentNode(rawText, parentNode, range) { | ||
if (parentNode === void 0) { parentNode = null; } | ||
var _this = _super.call(this, parentNode, range) || this; | ||
@@ -28,0 +29,0 @@ _this.rawText = rawText; |
@@ -65,3 +65,3 @@ import VoidTag from '../void-tag'; | ||
*/ | ||
constructor(tagName: string, keyAttrs: KeyAttributes, rawAttrs: string, parentNode: HTMLElement | null, range: [number, number], voidTag?: VoidTag, _parseOptions?: Partial<Options>); | ||
constructor(tagName: string, keyAttrs: KeyAttributes, rawAttrs?: string, parentNode?: HTMLElement, range?: [number, number], voidTag?: VoidTag, _parseOptions?: Partial<Options>); | ||
/** | ||
@@ -68,0 +68,0 @@ * Remove Child element from childNodes array |
@@ -159,2 +159,3 @@ "use strict"; | ||
if (rawAttrs === void 0) { rawAttrs = ''; } | ||
if (parentNode === void 0) { parentNode = null; } | ||
if (voidTag === void 0) { voidTag = new void_tag_1.default(); } | ||
@@ -203,3 +204,3 @@ if (_parseOptions === void 0) { _parseOptions = {}; } | ||
} | ||
return JSON.stringify(attr.replace(/"/g, '"')); | ||
return JSON.stringify(attr.replace(/"/g, '"')).replace(/\\t/g, '\t').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\/g, ''); | ||
}; | ||
@@ -733,2 +734,3 @@ /** | ||
HTMLElement.prototype.removeAttribute = function (key) { | ||
var _this = this; | ||
var attrs = this.rawAttributes; | ||
@@ -743,3 +745,3 @@ delete attrs[key]; | ||
.map(function (name) { | ||
var val = JSON.stringify(attrs[name]); | ||
var val = _this.quoteAttribute(attrs[name]); | ||
if (val === undefined || val === 'null') { | ||
@@ -746,0 +748,0 @@ return name; |
@@ -10,3 +10,3 @@ import HTMLElement from './html'; | ||
clone(): TextNode; | ||
constructor(rawText: string, parentNode: HTMLElement, range?: [number, number]); | ||
constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number]); | ||
/** | ||
@@ -13,0 +13,0 @@ * Node Type declaration. |
@@ -31,2 +31,3 @@ "use strict"; | ||
function TextNode(rawText, parentNode, range) { | ||
if (parentNode === void 0) { parentNode = null; } | ||
var _this = _super.call(this, parentNode, range) || this; | ||
@@ -33,0 +34,0 @@ /** |
{ | ||
"name": "node-html-parser", | ||
"version": "6.1.5", | ||
"version": "6.1.6", | ||
"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
161359
3733