Skip to content

Commit ba59af0

Browse files
Merge pull request #159 from remarkablemark/build/package
build(package): upgrade html-dom-parser@0.3.0 and devDependencies
2 parents 4078481 + 606d959 commit ba59af0

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The first argument is an object with the same output as [htmlparser2](https://gi
110110

111111
```js
112112
parse('<br>', {
113-
replace: function(domNode) {
113+
replace: function (domNode) {
114114
console.dir(domNode, { depth: null });
115115
}
116116
});
@@ -250,6 +250,16 @@ Check if your arguments are valid. Also, see ["Does this library sanitize invali
250250

251251
Yes, this library supports server-side rendering on Node.js. See [demo](https://repl.it/@remarkablemark/html-react-parser-SSR).
252252

253+
#### Why are my elements nested incorrectly?
254+
255+
Make sure your [HTML markup is valid](https://validator.w3.org/). The HTML to DOM parsing will be affected if you're using self-closing syntax (`/>`) on non-void elements:
256+
257+
```js
258+
parse('<div /><div />'); // returns single element instead of array of elements
259+
```
260+
261+
See [#158](https://github.com/remarkablemark/html-react-parser/issues/158).
262+
253263
## Benchmarks
254264

255265
```sh

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,32 @@
3333
],
3434
"dependencies": {
3535
"@types/domhandler": "2.4.1",
36-
"html-dom-parser": "0.2.3",
36+
"html-dom-parser": "0.3.0",
3737
"react-property": "1.0.1",
3838
"style-to-object": "0.3.0"
3939
},
4040
"devDependencies": {
4141
"@commitlint/cli": "^8.3.5",
4242
"@commitlint/config-conventional": "^8.3.4",
43+
"@rollup/plugin-commonjs": "^12.0.0",
44+
"@rollup/plugin-node-resolve": "^8.0.0",
4345
"@types/react": "^16.9.35",
4446
"benchmark": "^2.1.4",
45-
"dtslint": "^3.6.4",
47+
"dtslint": "^3.6.10",
4648
"eslint": "^7.1.0",
4749
"eslint-plugin-prettier": "^3.1.3",
4850
"husky": "^4.2.5",
49-
"lint-staged": "^10.2.6",
51+
"lint-staged": "^10.2.7",
5052
"mocha": "^7.2.0",
51-
"nyc": "^15.0.1",
53+
"nyc": "^15.1.0",
5254
"preact": "^10.4.4",
5355
"prettier": "^2.0.5",
5456
"react": "^16",
5557
"react-dom": "^16",
5658
"rimraf": "^3.0.2",
57-
"rollup": "^1.32.1",
58-
"rollup-plugin-commonjs": "^10.1.0",
59-
"rollup-plugin-node-resolve": "^5.2.0",
59+
"rollup": "^2.12.1",
6060
"rollup-plugin-uglify": "^6.0.4",
61-
"standard-version": "^6",
61+
"standard-version": "^5",
6262
"typescript": "^3.9.3"
6363
},
6464
"peerDependencies": {

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import commonjs from 'rollup-plugin-commonjs';
2-
import resolve from 'rollup-plugin-node-resolve';
1+
import commonjs from '@rollup/plugin-commonjs';
2+
import resolve from '@rollup/plugin-node-resolve';
33
import { uglify } from 'rollup-plugin-uglify';
44

55
/**

0 commit comments

Comments
 (0)