Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

feat(rendering): add setTextOnly duck #17

Merged
merged 6 commits into from
Sep 23, 2020
Merged

Conversation

infoxicator
Copy link
Contributor

@infoxicator infoxicator commented Aug 19, 2020

New rendering duck to add module as a text functionality.

@infoxicator infoxicator requested review from a team as code owners August 19, 2020 15:39
src/rendering.js Outdated Show resolved Hide resolved
mtomcal
mtomcal previously approved these changes Sep 8, 2020
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/rendering.js Outdated Show resolved Hide resolved
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. |
Copy link
Contributor

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 ?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
__tests__/rendering.spec.js Outdated Show resolved Hide resolved
src/rendering.js Outdated Show resolved Hide resolved
infoxicator and others added 2 commits September 11, 2020 12:39
@infoxicator infoxicator merged commit a18a2df into master Sep 23, 2020
@infoxicator infoxicator deleted the feature/render-text-only branch September 23, 2020 10:26
oneamexbot added a commit that referenced this pull request Sep 23, 2020
# [4.2.0](v4.1.1...v4.2.0) (2020-09-23)

### Features

* **rendering:** add setTextOnly duck ([#17](#17)) ([a18a2df](a18a2df))
@oneamexbot
Copy link
Contributor

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants