node-html-parser 6.1.8 → 6.1.9
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 +8 -0
- package/dist/main.js +4 -0
- package/dist/nodes/html.js +4 -0
- package/package.json +1 -1
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.9](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.8...v6.1.9) (2023-09-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* [#249](https://github.com/taoqf/node-fast-html-parser/issues/249) ([5a0a795](https://github.com/taoqf/node-fast-html-parser/commit/5a0a79573d51da9eccf6d13647413447eba413b1))
|
|
11
|
+
* test code for issue 249 ([799ee31](https://github.com/taoqf/node-fast-html-parser/commit/799ee31155a0635955b0a85e3d21ec4967223a25))
|
|
12
|
+
|
|
5
13
|
### [6.1.8](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.7...v6.1.8) (2023-09-08)
|
|
6
14
|
|
|
7
15
|
|
package/dist/main.js
CHANGED
|
@@ -591,6 +591,10 @@ define("nodes/html", ["require", "exports", "css-select", "he", "back", "matcher
|
|
|
591
591
|
* @return {string} text content
|
|
592
592
|
*/
|
|
593
593
|
get: function () {
|
|
594
|
+
// https://github.com/taoqf/node-html-parser/issues/249
|
|
595
|
+
if (/br/i.test(this.rawTagName)) {
|
|
596
|
+
return '\n';
|
|
597
|
+
}
|
|
594
598
|
return this.childNodes.reduce(function (pre, cur) {
|
|
595
599
|
return (pre += cur.rawText);
|
|
596
600
|
}, '');
|
package/dist/nodes/html.js
CHANGED
|
@@ -257,6 +257,10 @@ var HTMLElement = /** @class */ (function (_super) {
|
|
|
257
257
|
* @return {string} text content
|
|
258
258
|
*/
|
|
259
259
|
get: function () {
|
|
260
|
+
// https://github.com/taoqf/node-html-parser/issues/249
|
|
261
|
+
if (/br/i.test(this.rawTagName)) {
|
|
262
|
+
return '\n';
|
|
263
|
+
}
|
|
260
264
|
return this.childNodes.reduce(function (pre, cur) {
|
|
261
265
|
return (pre += cur.rawText);
|
|
262
266
|
}, '');
|
package/package.json
CHANGED