html-react-parser 3.0.11 → 3.0.13

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
@@ -2,11 +2,11 @@
2
2
 
3
3
  [![NPM](https://nodei.co/npm/html-react-parser.png)](https://nodei.co/npm/html-react-parser/)
4
4
 
5
- [![NPM version](https://img.shields.io/npm/v/html-react-parser.svg)](https://www.npmjs.com/package/html-react-parser)
6
- [![Bundlephobia minified + gzip](https://img.shields.io/bundlephobia/minzip/html-react-parser)](https://bundlephobia.com/package/html-react-parser)
5
+ [![NPM version](https://badgen.net/npm/v/html-react-parser)](https://www.npmjs.com/package/html-react-parser)
6
+ [![Bundlephobia minified + gzip](https://badgen.net/bundlephobia/minzip/html-react-parser)](https://bundlephobia.com/package/html-react-parser)
7
7
  [![Build Status](https://github.com/remarkablemark/html-react-parser/workflows/build/badge.svg?branch=master)](https://github.com/remarkablemark/html-react-parser/actions?query=workflow%3Abuild)
8
8
  [![codecov](https://codecov.io/gh/remarkablemark/html-react-parser/branch/master/graph/badge.svg?token=wosFd1DBIR)](https://codecov.io/gh/remarkablemark/html-react-parser)
9
- [![NPM downloads](https://img.shields.io/npm/dm/html-react-parser.svg?style=flat-square)](https://www.npmjs.com/package/html-react-parser)
9
+ [![NPM downloads](https://badgen.net/npm/dm/html-react-parser)](https://www.npmjs.com/package/html-react-parser)
10
10
  [![Discord](https://img.shields.io/discord/422421589582282752.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/njExwXdrRJ)
11
11
 
12
12
  HTML to React parser that works on both the server (Node.js) and the client (browser):
@@ -905,7 +905,7 @@
905
905
  'feFuncB',
906
906
  'feFuncG',
907
907
  'feFuncR',
908
- 'feGaussainBlur',
908
+ 'feGaussianBlur',
909
909
  'feImage',
910
910
  'feMerge',
911
911
  'feMergeNode',
@@ -994,6 +994,7 @@
994
994
  function formatDOM$1(nodes, parent, directive) {
995
995
  parent = parent || null;
996
996
  var result = [];
997
+ var tagName;
997
998
 
998
999
  for (var index = 0, len = nodes.length; index < len; index++) {
999
1000
  var node = nodes[index];
@@ -1002,14 +1003,12 @@
1002
1003
  // set the node data given the type
1003
1004
  switch (node.nodeType) {
1004
1005
  case 1:
1006
+ tagName = formatTagName(node.nodeName);
1005
1007
  // script, style, or tag
1006
- current = new Element(
1007
- formatTagName(node.nodeName),
1008
- formatAttributes(node.attributes)
1009
- );
1008
+ current = new Element(tagName, formatAttributes(node.attributes));
1010
1009
  current.children = formatDOM$1(
1011
1010
  // template children are on content
1012
- node.content ? node.content.childNodes : node.childNodes,
1011
+ tagName === 'template' ? node.content.childNodes : node.childNodes,
1013
1012
  current
1014
1013
  );
1015
1014
  break;