html-react-parser 3.0.8 → 3.0.10

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/README.md CHANGED
@@ -333,7 +333,7 @@ parse('<br>', {
333
333
 
334
334
  ### htmlparser2
335
335
 
336
- > `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.
336
+ > **Warning**: `htmlparser2` options _**do not** work on the client-side_ (browser) and the options _**only work** on the server-side_ (Node.js). By overriding the options, it could cause universal rendering to break.
337
337
 
338
338
  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).
339
339
 
@@ -10,12 +10,6 @@
10
10
 
11
11
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
12
12
 
13
- exports["default"] = {};
14
- var htmlReactParser = {
15
- get exports(){ return exports["default"]; },
16
- set exports(v){ exports["default"] = v; },
17
- };
18
-
19
13
  var lib$2 = {};
20
14
 
21
15
  var lib$1 = {};
@@ -1013,7 +1007,11 @@
1013
1007
  formatTagName(node.nodeName),
1014
1008
  formatAttributes(node.attributes)
1015
1009
  );
1016
- current.children = formatDOM$1(node.childNodes, current);
1010
+ current.children = formatDOM$1(
1011
+ // template children are on content
1012
+ node.content ? node.content.childNodes : node.childNodes,
1013
+ current
1014
+ );
1017
1015
  break;
1018
1016
 
1019
1017
  case 3:
@@ -2685,10 +2683,10 @@
2685
2683
  HTMLReactParser.Text = domhandler.Text;
2686
2684
 
2687
2685
  // support CommonJS and ES Modules
2688
- htmlReactParser.exports = HTMLReactParser;
2689
- exports["default"].default = HTMLReactParser;
2686
+ var htmlReactParser = HTMLReactParser;
2687
+ HTMLReactParser.default = HTMLReactParser;
2690
2688
 
2691
- return exports["default"];
2689
+ return htmlReactParser;
2692
2690
 
2693
2691
  }));
2694
2692
  //# sourceMappingURL=html-react-parser.js.map