Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to Rework Replace Helper? #137

Open
mattcoy-arcticleaf opened this issue Mar 29, 2021 · 3 comments
Open

Possible to Rework Replace Helper? #137

mattcoy-arcticleaf opened this issue Mar 29, 2021 · 3 comments

Comments

@mattcoy-arcticleaf
Copy link

I was wondering if it would be possible to rework the replace helper to allow it to be used inline. As it stands, it's very difficult to use. In fact, it's only used in one instance in Cornerstone. If it could be reworked (or a new helper created) to allow for inline use, it would be infinitely more useful!

For example, if the following code: {{replace 'A1x2Bx' 'x' 'b'}} could render out as A1b2Bb, that would give us a lot of control!

@jairo-bc
Copy link
Contributor

Hi @mattcoy-arcticleaf!
For backward compatibility it's not the best scenario to change the current behaviour of the helper. But on the other hand, a new one, for example str_replace, is good enough and Pull Requests to the repo are welcomed!

@mattcoy-arcticleaf
Copy link
Author

@jairo-bc , Thanks for the reply! I'll have my team get on it right away. I know this new helper will live up to its name.

@mattcoy-arcticleaf
Copy link
Author

@jairo-bc , Pull Request created! #156

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

No branches or pull requests

2 participants