You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-14Lines changed: 6 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ HTML output:
286
286
287
287
### library
288
288
289
-
This option specifies the library that creates elements. The default library is **React**.
289
+
The `library`option specifies the UI library. The default library is **React**.
290
290
291
291
To use Preact:
292
292
@@ -316,17 +316,11 @@ parse('<br>', {
316
316
317
317
### htmlparser2
318
318
319
-
Along with the default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode), the parser also sets:
319
+
> `htmlparser2` options **do not work on the client-side** (browser) and **only works on the server-side** (Node.js). By overriding `htmlparser2`options, universal rendering can break.
320
320
321
-
```json
322
-
{
323
-
"lowerCaseAttributeNames": false
324
-
}
325
-
```
321
+
Default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) can be overridden in >=[0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0).
326
322
327
-
Since [v0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0), the htmlparser2 options can be overridden.
328
-
329
-
The following example enables [`xmlMode`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) but disables [`lowerCaseAttributeNames`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-lowercaseattributenames):
323
+
To enable [`xmlMode`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode):
330
324
331
325
```js
332
326
parse('<p /><p />', {
@@ -336,17 +330,15 @@ parse('<p /><p />', {
336
330
});
337
331
```
338
332
339
-
> **WARNING**: `htmlparser2` options do not apply on the _client-side_ (browser). The options only apply on the _server-side_ (Node.js). By overriding `htmlparser2` options, universal rendering can break. Do this at your own risk.
0 commit comments