node-html-parser
Advanced tools
+8
-0
@@ -5,2 +5,10 @@ # Changelog | ||
| ### [8.0.2](https://github.com/taoqf/node-fast-html-parser/compare/v8.0.1...v8.0.2) (2026-06-21) | ||
| ### Bug Fixes | ||
| * preserve backslashes in attribute values during serialization and round-trip parsing [#306](https://github.com/taoqf/node-fast-html-parser/issues/306) ([a9882b2](https://github.com/taoqf/node-fast-html-parser/commit/a9882b245d2a1e1adfe6b3a61d6f3fa3bfbb3e32)) | ||
| * update casing of HTML tag names in usage example [#289](https://github.com/taoqf/node-fast-html-parser/issues/289) ([801d278](https://github.com/taoqf/node-fast-html-parser/commit/801d278d6b23c99b196461590dbbf3f60339a22d)) | ||
| ### [8.0.1](https://github.com/taoqf/node-fast-html-parser/compare/v8.0.0...v8.0.1) (2026-06-20) | ||
@@ -7,0 +15,0 @@ |
+21
-13
@@ -106,6 +106,6 @@ "use strict"; | ||
| return JSON.stringify(attr.replace(/"/g, '"')) | ||
| .replace(/\\t/g, '\t') | ||
| .replace(/\\n/g, '\n') | ||
| .replace(/\\r/g, '\r') | ||
| .replace(/\\/g, ''); | ||
| .replace(/([^\\])\\t/g, '$1\t') | ||
| .replace(/([^\\])\\n/g, '$1\n') | ||
| .replace(/([^\\])\\r/g, '$1\r') | ||
| .replace(/([^\\])\\/g, '$1'); | ||
| } | ||
@@ -887,2 +887,3 @@ /** | ||
| const kMarkupPattern = /<!--[\s\S]*?-->|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z@\xB7\xC0-\xD6\xD8-\xF6\u00F8-\u03A1\u03A3-\u03D9\u03DB-\u03EF\u03F7-\u03FF\u0400-\u04FF\u0500-\u052F\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1E9B\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA78E\uA790-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64-\uAB65\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\x37F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/gu; | ||
| const kMarkupPatternWithCDATA = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z@\xB7\xC0-\xD6\xD8-\xF6\u00F8-\u03A1\u03A3-\u03D9\u03DB-\u03EF\u03F7-\u03FF\u0400-\u04FF\u0500-\u052F\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1E9B\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA78E\uA790-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64-\uAB65\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\x37F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/gu; | ||
| // const kMarkupPattern = /<!--[\s\S]*?-->|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g; | ||
@@ -943,2 +944,4 @@ const kAttributePattern = /(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi; | ||
| const voidTag = new void_tag_1.default((_a = options === null || options === void 0 ? void 0 : options.voidTag) === null || _a === void 0 ? void 0 : _a.closingSlash, (_b = options === null || options === void 0 ? void 0 : options.voidTag) === null || _b === void 0 ? void 0 : _b.tags); | ||
| const hasCDATA = data.includes('<](http://badge.fury.io/js/node-html-parser) [](https://actions-badge.atrox.dev/taoqf/node-html-parser/goto?ref=main) | ||
| console.log(root.querySelector('#list')); | ||
| // { tagName: 'ul', | ||
| // { tagName: 'UL', | ||
| // rawAttrs: 'id="list"', | ||
| // childNodes: | ||
| // [ { tagName: 'li', | ||
| // [ { tagName: 'LI', | ||
| // rawAttrs: '', | ||
@@ -59,0 +59,0 @@ // childNodes: [Object], |
Sorry, the diff of this file is too big to display
176479
1.81%3801
0.58%