-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
README.md
Outdated
| Argument | Type | Description | | ||
|---|---|---| | ||
| `setTextOnly` | `Boolean` | (required) set whether to return text instead of HTML | | ||
| `tagReplacement` | `String` | Replace html tags with the character passed to this option i.e. '/n'. Defaults to empty string. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so there can only be one replacement, not possible to have <p>
replaced with empty string and <h1>
replaced with /n
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's the limitation of that strip tags library replace all of them or nothing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also looks like it has not been maintained in the last 3 years
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that, not sure if it should change much... what I like about it is doesn't use regex. We need to balance this drawback compared to creating and maintaining a new library ourselves
Co-authored-by: Jimmy King <jimmy.king@aexp.com>
# [4.2.0](v4.1.1...v4.2.0) (2020-09-23) ### Features * **rendering:** add setTextOnly duck ([#17](#17)) ([a18a2df](a18a2df))
🎉 This PR is included in version 4.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
New rendering duck to add module as a text functionality.