node-html-parser 6.1.10 → 6.1.11

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,14 @@
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.11](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.10...v6.1.11) (2023-10-25)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * [#254](https://github.com/taoqf/node-fast-html-parser/issues/254) ([8e4e9e0](https://github.com/taoqf/node-fast-html-parser/commit/8e4e9e0a13796ed9a39ebb930b0ee5e55b578b82))
11
+ * Fixed typo in JSDoc for HTMLElement `structure` method ([3a52ee9](https://github.com/taoqf/node-fast-html-parser/commit/3a52ee97463d8ab1f35ef7c0f08d3696bc38e5c4))
12
+
5
13
  ### [6.1.10](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.9...v6.1.10) (2023-09-15)
6
14
 
7
15
 
package/dist/main.js CHANGED
@@ -592,7 +592,7 @@ define("nodes/html", ["require", "exports", "css-select", "he", "back", "matcher
592
592
  */
593
593
  get: function () {
594
594
  // https://github.com/taoqf/node-html-parser/issues/249
595
- if (/br/i.test(this.rawTagName)) {
595
+ if (/^br$/i.test(this.rawTagName)) {
596
596
  return '\n';
597
597
  }
598
598
  return this.childNodes.reduce(function (pre, cur) {
@@ -772,7 +772,7 @@ define("nodes/html", ["require", "exports", "css-select", "he", "back", "matcher
772
772
  Object.defineProperty(HTMLElement.prototype, "structure", {
773
773
  /**
774
774
  * Get DOM structure
775
- * @return {string} strucutre
775
+ * @return {string} structure
776
776
  */
777
777
  get: function () {
778
778
  var res = [];
@@ -109,7 +109,7 @@ export default class HTMLElement extends Node {
109
109
  trimRight(pattern: RegExp): this;
110
110
  /**
111
111
  * Get DOM structure
112
- * @return {string} strucutre
112
+ * @return {string} structure
113
113
  */
114
114
  get structure(): string;
115
115
  /**
@@ -258,7 +258,7 @@ var HTMLElement = /** @class */ (function (_super) {
258
258
  */
259
259
  get: function () {
260
260
  // https://github.com/taoqf/node-html-parser/issues/249
261
- if (/br/i.test(this.rawTagName)) {
261
+ if (/^br$/i.test(this.rawTagName)) {
262
262
  return '\n';
263
263
  }
264
264
  return this.childNodes.reduce(function (pre, cur) {
@@ -438,7 +438,7 @@ var HTMLElement = /** @class */ (function (_super) {
438
438
  Object.defineProperty(HTMLElement.prototype, "structure", {
439
439
  /**
440
440
  * Get DOM structure
441
- * @return {string} strucutre
441
+ * @return {string} structure
442
442
  */
443
443
  get: function () {
444
444
  var res = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-html-parser",
3
- "version": "6.1.10",
3
+ "version": "6.1.11",
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",
@@ -22,9 +22,9 @@
22
22
  "reset": "yarn run clean:global && yarn install && yarn build",
23
23
  "--------------- ": "",
24
24
  "test:target": "mocha --recursive \"./test/tests\"",
25
- "test:ci": "cross-env TEST_TARGET=dist yarn run test:target",
25
+ "test:ci": "cd test && yarn install && cd .. && cross-env TEST_TARGET=dist yarn run test:target",
26
26
  "posttest": "yarn run benchmark",
27
- "prepare": "cd test && yarn install",
27
+ "prepare": "npm run build",
28
28
  "release": "standard-version && git push --follow-tags origin main"
29
29
  },
30
30
  "keywords": [