Skip to content

Commit

Permalink
Update docs. See #396.
Browse files Browse the repository at this point in the history
  • Loading branch information
martincizek committed Nov 22, 2021
1 parent 9677c79 commit 4499b5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ The filter property determines whether or not an element should be replaced with
* `filter: 'p'` will select `<p>` elements
* `filter: ['em', 'i']` will select `<em>` or `<i>` elements

The tag names in the `filter` property are expected in lowercase, regardless of their form in the document.

Alternatively, the filter can be a function that returns a boolean depending on whether a given node should be replaced. The function is passed a DOM node as well as the `TurndownService` options. For example, the following rule selects `<a>` elements (with an `href`) when the `linkStyle` option is `inlined`:

```js
Expand Down

0 comments on commit 4499b5c

Please sign in to comment.