html-react-parser 1.2.7 → 1.4.0

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,7 +2,38 @@
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.7](https://github.com/remarkablemark/html-react-parser/compare/v1.2.6...v1.2.7) (2021-06-19)
5
+ ## [1.4.0](https://www.github.com/remarkablemark/html-react-parser/compare/v1.3.0...v1.4.0) (2021-10-01)
6
+
7
+
8
+ ### Features
9
+
10
+ * added CRA typescript example ([42f42e5](https://www.github.com/remarkablemark/html-react-parser/commit/42f42e519c05c382476a14a73d45b5f700fecdbb))
11
+ * export domhandler's Element ([0473e83](https://www.github.com/remarkablemark/html-react-parser/commit/0473e832ac65b3e8ce5f8da69c740cbd84f62863))
12
+
13
+ ## [1.3.0](https://www.github.com/remarkablemark/html-react-parser/compare/v1.2.9...v1.3.0) (2021-09-07)
14
+
15
+
16
+ ### Features
17
+
18
+ * upgrade `react-property` to get react-dom 17 DOM/SVG properties ([f0fbbff](https://www.github.com/remarkablemark/html-react-parser/commit/f0fbbffa7b14262b696fb7ec33f050701bdf2e37))
19
+
20
+ ### [1.2.9](https://www.github.com/remarkablemark/html-react-parser/compare/v1.2.8...v1.2.9) (2021-09-06)
21
+
22
+
23
+ ### Build System
24
+
25
+ * **deps:** bump domhandler from 4.2.0 to 4.2.2 ([cac7ddf](https://www.github.com/remarkablemark/html-react-parser/commit/cac7ddfb370fb0fdf8daaec02dfb2a3c3a3f77c6))
26
+ * **deps:** bump html-dom-parser from 1.0.1 to 1.0.2 ([72cccad](https://www.github.com/remarkablemark/html-react-parser/commit/72cccad24661b0c2e74370f183b96cdfb5da98d0))
27
+ * **deps:** bump react-property from 1.0.1 to 1.0.2 ([9feedd7](https://www.github.com/remarkablemark/html-react-parser/commit/9feedd722db49bd1752b38476b0e14ca93ea41c1))
28
+
29
+ ## [1.2.8](https://github.com/remarkablemark/html-react-parser/compare/v1.2.7...v1.2.8) (2021-08-12)
30
+
31
+ ### Bug Fixes
32
+
33
+ - rename unit test per feedback ([f39cf38](https://github.com/remarkablemark/html-react-parser/commit/f39cf387cdf1d4866b7ff9538189cb1e1c862199))
34
+ - **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)
35
+
36
+ ## [1.2.7](https://github.com/remarkablemark/html-react-parser/compare/v1.2.6...v1.2.7) (2021-06-19)
6
37
 
7
38
  ## [1.2.6](https://github.com/remarkablemark/html-react-parser/compare/v1.2.5...v1.2.6) (2021-04-18)
8
39
 
package/README.md CHANGED
@@ -4,7 +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)
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)
8
8
  [![Dependency status](https://david-dm.org/remarkablemark/html-react-parser.svg)](https://david-dm.org/remarkablemark/html-react-parser)
9
9
  [![NPM downloads](https://img.shields.io/npm/dm/html-react-parser.svg?style=flat-square)](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)
@@ -188,8 +188,7 @@ parse('<p id="replace">text</p>', {
188
188
  For TypeScript projects, you may need to check that `domNode` is an instance of domhandler's `Element`:
189
189
 
190
190
  ```tsx
191
- import { HTMLReactParserOptions } from 'html-react-parser';
192
- import { Element } from 'domhandler/lib/node';
191
+ import { HTMLReactParserOptions, Element } from 'html-react-parser';
193
192
 
194
193
  const options: HTMLReactParserOptions = {
195
194
  replace: domNode => {
@@ -200,7 +199,7 @@ const options: HTMLReactParserOptions = {
200
199
  };
201
200
  ```
202
201
 
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).
202
+ If you're having issues take a look at our [Create React App example](./examples/create-react-app-typescript/src/App.tsx).
204
203
 
205
204
  #### replace element and children
206
205
 
@@ -477,8 +476,8 @@ Then update your Webpack config to:
477
476
  module.exports = {
478
477
  // ...
479
478
  resolve: {
480
- mainFields: ['browser', 'main', 'module'],
481
- },
479
+ mainFields: ['browser', 'main', 'module']
480
+ }
482
481
  };
483
482
  ```
484
483