html-react-parser 3.0.4 → 3.0.6

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
@@ -3,6 +3,7 @@
3
3
  [![NPM](https://nodei.co/npm/html-react-parser.png)](https://nodei.co/npm/html-react-parser/)
4
4
 
5
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)
6
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)
7
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)
8
9
  [![NPM downloads](https://img.shields.io/npm/dm/html-react-parser.svg?style=flat-square)](https://www.npmjs.com/package/html-react-parser)
@@ -56,6 +57,7 @@ parse('<p>Hello, World!</p>'); // React.createElement('p', {}, 'Hello, World!')
56
57
  - [TS Error: Property 'attribs' does not exist on type 'DOMNode'](#ts-error-property-attribs-does-not-exist-on-type-domnode)
57
58
  - [Can I enable `trim` for certain elements?](#can-i-enable-trim-for-certain-elements)
58
59
  - [Webpack build warnings](#webpack-build-warnings)
60
+ - [TypeScript error](#typescript-error)
59
61
  - [Performance](#performance)
60
62
  - [Contributors](#contributors)
61
63
  - [Code Contributors](#code-contributors)
@@ -377,6 +379,8 @@ parse('<p> </p>', { trim: true }); // React.createElement('p')
377
379
 
378
380
  [domhandler](https://github.com/fb55/domhandler) has been upgraded to v5 so some [parser options](https://github.com/fb55/htmlparser2/wiki/Parser-options) like `normalizeWhitespace` have been removed.
379
381
 
382
+ Also, it's recommended to upgrade to the latest version of [typescript](https://www.npmjs.com/package/typescript).
383
+
380
384
  ### v2.0.0
381
385
 
382
386
  Since [v2.0.0](https://github.com/remarkablemark/html-react-parser/releases/tag/v2.0.0), Internet Explorer (IE) is no longer supported.
@@ -488,6 +492,19 @@ module.exports = {
488
492
 
489
493
  See [#238](https://github.com/remarkablemark/html-react-parser/issues/238) and [#213](https://github.com/remarkablemark/html-react-parser/issues/213).
490
494
 
495
+ ### TypeScript error
496
+
497
+ If you see the TypeScript error:
498
+
499
+ ```
500
+ node_modules/htmlparser2/lib/index.d.ts:2:23 - error TS1005: ',' expected.
501
+
502
+ 2 export { Parser, type ParserOptions };
503
+ ~~~~~~~~~~~~~
504
+ ```
505
+
506
+ Then upgrade to the latest version of [typescript](https://www.npmjs.com/package/typescript). See [#748](https://github.com/remarkablemark/html-react-parser/issues/748).
507
+
491
508
  ## Performance
492
509
 
493
510
  Run benchmark: