html-react-parser 1.2.8 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -2,13 +2,43 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.2.8](https://github.com/remarkablemark/html-react-parser/compare/v1.2.7...v1.2.8) (2021-08-12)
5
+ ### [1.4.1](https://www.github.com/remarkablemark/html-react-parser/compare/v1.4.0...v1.4.1) (2021-11-27)
6
6
 
7
7
 
8
+ ### Performance Improvements
9
+
10
+ * upgrade dependency html-dom-parser to v1.0.3 ([8987efb](https://www.github.com/remarkablemark/html-react-parser/commit/8987efb0aaf43a013bfa7aa37a9f2c404b47dedc))
11
+
12
+ ## [1.4.0](https://www.github.com/remarkablemark/html-react-parser/compare/v1.3.0...v1.4.0) (2021-10-01)
13
+
14
+
15
+ ### Features
16
+
17
+ * added CRA typescript example ([42f42e5](https://www.github.com/remarkablemark/html-react-parser/commit/42f42e519c05c382476a14a73d45b5f700fecdbb))
18
+ * export domhandler's Element ([0473e83](https://www.github.com/remarkablemark/html-react-parser/commit/0473e832ac65b3e8ce5f8da69c740cbd84f62863))
19
+
20
+ ## [1.3.0](https://www.github.com/remarkablemark/html-react-parser/compare/v1.2.9...v1.3.0) (2021-09-07)
21
+
22
+
23
+ ### Features
24
+
25
+ * upgrade `react-property` to get react-dom 17 DOM/SVG properties ([f0fbbff](https://www.github.com/remarkablemark/html-react-parser/commit/f0fbbffa7b14262b696fb7ec33f050701bdf2e37))
26
+
27
+ ### [1.2.9](https://www.github.com/remarkablemark/html-react-parser/compare/v1.2.8...v1.2.9) (2021-09-06)
28
+
29
+
30
+ ### Build System
31
+
32
+ * **deps:** bump domhandler from 4.2.0 to 4.2.2 ([cac7ddf](https://www.github.com/remarkablemark/html-react-parser/commit/cac7ddfb370fb0fdf8daaec02dfb2a3c3a3f77c6))
33
+ * **deps:** bump html-dom-parser from 1.0.1 to 1.0.2 ([72cccad](https://www.github.com/remarkablemark/html-react-parser/commit/72cccad24661b0c2e74370f183b96cdfb5da98d0))
34
+ * **deps:** bump react-property from 1.0.1 to 1.0.2 ([9feedd7](https://www.github.com/remarkablemark/html-react-parser/commit/9feedd722db49bd1752b38476b0e14ca93ea41c1))
35
+
36
+ ## [1.2.8](https://github.com/remarkablemark/html-react-parser/compare/v1.2.7...v1.2.8) (2021-08-12)
37
+
8
38
  ### Bug Fixes
9
39
 
10
- * rename unit test per feedback ([f39cf38](https://github.com/remarkablemark/html-react-parser/commit/f39cf387cdf1d4866b7ff9538189cb1e1c862199))
11
- * **utilities:** skip corrupted style attributes ([509486e](https://github.com/remarkablemark/html-react-parser/commit/509486e94a45477b17630850b35c0db1faf0a31e)), closes [#256](https://github.com/remarkablemark/html-react-parser/issues/256)
40
+ - rename unit test per feedback ([f39cf38](https://github.com/remarkablemark/html-react-parser/commit/f39cf387cdf1d4866b7ff9538189cb1e1c862199))
41
+ - **utilities:** skip corrupted style attributes ([509486e](https://github.com/remarkablemark/html-react-parser/commit/509486e94a45477b17630850b35c0db1faf0a31e)), closes [#256](https://github.com/remarkablemark/html-react-parser/issues/256)
12
42
 
13
43
  ## [1.2.7](https://github.com/remarkablemark/html-react-parser/compare/v1.2.6...v1.2.7) (2021-06-19)
14
44
 
package/README.md CHANGED
@@ -4,8 +4,7 @@
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
6
  [![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
- [![Coverage Status](https://coveralls.io/repos/github/remarkablemark/html-react-parser/badge.svg?branch=master)](https://coveralls.io/github/remarkablemark/html-react-parser?branch=master)
8
- [![Dependency status](https://david-dm.org/remarkablemark/html-react-parser.svg)](https://david-dm.org/remarkablemark/html-react-parser)
7
+ [![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
8
  [![NPM downloads](https://img.shields.io/npm/dm/html-react-parser.svg?style=flat-square)](https://www.npmjs.com/package/html-react-parser)
10
9
  [![Discord](https://img.shields.io/discord/422421589582282752.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/njExwXdrRJ)
11
10
 
@@ -188,8 +187,7 @@ parse('<p id="replace">text</p>', {
188
187
  For TypeScript projects, you may need to check that `domNode` is an instance of domhandler's `Element`:
189
188
 
190
189
  ```tsx
191
- import { HTMLReactParserOptions } from 'html-react-parser';
192
- import { Element } from 'domhandler/lib/node';
190
+ import { HTMLReactParserOptions, Element } from 'html-react-parser';
193
191
 
194
192
  const options: HTMLReactParserOptions = {
195
193
  replace: domNode => {
@@ -200,7 +198,7 @@ const options: HTMLReactParserOptions = {
200
198
  };
201
199
  ```
202
200
 
203
- If you're having issues with `domNode instanceof Element`, try this [alternative solution](https://github.com/remarkablemark/html-react-parser/issues/221#issuecomment-771600574).
201
+ If you're having issues take a look at our [Create React App example](./examples/create-react-app-typescript/src/App.tsx).
204
202
 
205
203
  #### replace element and children
206
204
 
@@ -477,8 +475,8 @@ Then update your Webpack config to:
477
475
  module.exports = {
478
476
  // ...
479
477
  resolve: {
480
- mainFields: ['browser', 'main', 'module'],
481
- },
478
+ mainFields: ['browser', 'main', 'module']
479
+ }
482
480
  };
483
481
  ```
484
482