node-html-parser 6.1.1 → 6.1.3

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 CHANGED
@@ -2,6 +2,15 @@
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.3](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.2...v6.1.3) (2022-11-14)
6
+
7
+ ### [6.1.2](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.1...v6.1.2) (2022-11-14)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * [#224](https://github.com/taoqf/node-fast-html-parser/issues/224) ([fc367fa](https://github.com/taoqf/node-fast-html-parser/commit/fc367fa294d72794a0dea49edbd986d527a6314b))
13
+
5
14
  ### [6.1.1](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.0...v6.1.1) (2022-09-24)
6
15
 
7
16
 
package/dist/main.js CHANGED
@@ -171,7 +171,7 @@ define("matcher", ["require", "exports", "nodes/type"], function (require, expor
171
171
  }
172
172
  function findOne(test, elems) {
173
173
  var elem = null;
174
- for (var i = 0, l = elems.length; i < l && !elem; i++) {
174
+ for (var i = 0, l = elems === null || elems === void 0 ? void 0 : elems.length; i < l && !elem; i++) {
175
175
  var el = elems[i];
176
176
  if (test(el)) {
177
177
  elem = el;
@@ -1044,7 +1044,7 @@ define("nodes/html", ["require", "exports", "css-select", "he", "back", "matcher
1044
1044
  }
1045
1045
  var attrs = {};
1046
1046
  if (this.rawAttrs) {
1047
- var re = /([a-zA-Z()[\]#@][a-zA-Z0-9-_:()[\]#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
1047
+ var re = /([a-zA-Z()[\]#@$.?][a-zA-Z0-9-_:()[\]#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
1048
1048
  var match = void 0;
1049
1049
  while ((match = re.exec(this.rawAttrs))) {
1050
1050
  var key = match[1];
package/dist/matcher.js CHANGED
@@ -63,7 +63,7 @@ function hasAttrib(elem, name) {
63
63
  }
64
64
  function findOne(test, elems) {
65
65
  var elem = null;
66
- for (var i = 0, l = elems.length; i < l && !elem; i++) {
66
+ for (var i = 0, l = elems === null || elems === void 0 ? void 0 : elems.length; i < l && !elem; i++) {
67
67
  var el = elems[i];
68
68
  if (test(el)) {
69
69
  elem = el;
@@ -143,7 +143,7 @@ export default class HTMLElement extends Node {
143
143
  * traverses the Element and its parents (heading toward the document root) until it finds a node that matches the provided selector string. Will return itself or the matching ancestor. If no such element exists, it returns null.
144
144
  * @param selector a DOMString containing a selector list
145
145
  */
146
- closest(selector: string): Node;
146
+ closest(selector: string): HTMLElement;
147
147
  /**
148
148
  * Append a child node to childNodes
149
149
  * @param {Node} node node to append
@@ -711,7 +711,7 @@ var HTMLElement = /** @class */ (function (_super) {
711
711
  }
712
712
  var attrs = {};
713
713
  if (this.rawAttrs) {
714
- var re = /([a-zA-Z()[\]#@][a-zA-Z0-9-_:()[\]#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
714
+ var re = /([a-zA-Z()[\]#@$.?][a-zA-Z0-9-_:()[\]#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
715
715
  var match = void 0;
716
716
  while ((match = re.exec(this.rawAttrs))) {
717
717
  var key = match[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-html-parser",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
4
4
  "description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,8 @@
24
24
  "test:target": "mocha --recursive \"./test/tests\"",
25
25
  "test:ci": "cross-env TEST_TARGET=dist yarn run test:target",
26
26
  "posttest": "yarn run benchmark",
27
- "prepare": "cd test && yarn install"
27
+ "prepare": "cd test && yarn install",
28
+ "release": "standard-version && git push --follow-tags origin main"
28
29
  },
29
30
  "keywords": [
30
31
  "html",