@@ -29,26 +29,26 @@ Parser('<p>Hello, world!</p>');
29
29
## Installation
30
30
31
31
[ NPM] ( https://www.npmjs.com/package/html-react-parser ) :
32
-
33
32
``` sh
34
- npm install html-react-parser --save
33
+ $ npm install html-react-parser --save
35
34
```
36
35
37
36
[ Yarn] ( https://yarn.fyi/html-react-parser ) :
38
-
39
37
``` sh
40
- yarn add html-react-parser
38
+ $ yarn add html-react-parser
41
39
```
42
40
43
41
[ CDN] ( https://unpkg.com/html-react-parser/ ) :
44
-
45
42
``` html
46
43
<!-- HTMLReactParser depends on React -->
47
44
<script src =" https://unpkg.com/react@16/umd/react.production.min.js" ></script >
48
45
<script src =" https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js" ></script >
46
+ <script >
47
+ window .HTMLReactParser (/* string */ );
48
+ </script >
49
49
```
50
50
51
- More [ examples] ( https://github.com/remarkablemark/html-react-parser/tree/master/examples ) .
51
+ See more [ examples] ( https://github.com/remarkablemark/html-react-parser/tree/master/examples ) .
52
52
53
53
## Usage
54
54
@@ -180,18 +180,17 @@ Parser('<p><br id="remove"></p>', {
180
180
## Testing
181
181
182
182
``` sh
183
- npm test
184
- npm run lint # npm run lint:fix
183
+ $ npm test
184
+ $ npm run lint # npm run lint:fix
185
185
```
186
186
187
187
## Benchmarks
188
188
189
189
``` sh
190
- npm run test:benchmark
190
+ $ npm run test:benchmark
191
191
```
192
192
193
193
Here's an example output of the benchmarks run on a MacBook Pro 2017:
194
-
195
194
```
196
195
html-to-react - Single x 415,186 ops/sec ±0.92% (85 runs sampled)
197
196
html-to-react - Multiple x 139,780 ops/sec ±2.32% (87 runs sampled)
@@ -201,9 +200,9 @@ html-to-react - Complex x 8,118 ops/sec ±2.99% (82 runs sampled)
201
200
## Release
202
201
203
202
``` sh
204
- npm run release
205
- npm publish
206
- git push --follow-tags
203
+ $ npm run release
204
+ $ npm publish
205
+ $ git push --follow-tags
207
206
```
208
207
209
208
## Special Thanks
0 commit comments