Skip to content

Commit e7604e6

Browse files
docs(readme): update heading and link for replace
1 parent 2a61ee6 commit e7604e6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ HTMLReactParser(string[, options])
1717

1818
The parser converts an HTML string to one or more [React elements](https://reactjs.org/docs/react-api.html#creating-react-elements).
1919

20-
To replace an element with a custom element, check out the [replace option](#replacedomnode).
20+
To replace an element with another element, check out the [`replace`](#replace) option.
2121

2222
#### Example
2323

@@ -33,7 +33,7 @@ parse('<p>Hello, World!</p>'); // React.createElement('p', {}, 'Hello, World!')
3333

3434
- [Install](#install)
3535
- [Usage](#usage)
36-
- [replace(domNode)](#replacedomnode)
36+
- [replace](#replace)
3737
- [library](#library)
3838
- [htmlparser2](#htmlparser2)
3939
- [trim](#trim)
@@ -136,11 +136,11 @@ parse(
136136
);
137137
```
138138

139-
### replace(domNode)
139+
### replace
140140

141-
The `replace` option allows you to replace an element with another React element.
141+
The `replace` option allows you to replace an element with another element.
142142

143-
The `replace` callback's 1st argument is a [domhandler](https://github.com/fb55/domhandler#example) node:
143+
The `replace` callback's first argument is [domhandler](https://github.com/fb55/domhandler#example)'s node:
144144

145145
```js
146146
parse('<br>', {
@@ -452,7 +452,7 @@ The TypeScript error occurs because `DOMNode` needs be an instance of domhandler
452452
453453
### Can I enable `trim` for certain elements?
454454
455-
Yes, you can enable or disable [`trim`](#trim) for certain elements using the [`replace`](#replacedomnode) option. See [#205](https://github.com/remarkablemark/html-react-parser/issues/205).
455+
Yes, you can enable or disable [`trim`](#trim) for certain elements using the [`replace`](#replace) option. See [#205](https://github.com/remarkablemark/html-react-parser/issues/205).
456456
457457
## Performance
458458

0 commit comments

Comments
 (0)