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

replacing underscore with space #9

Open
marczz opened this issue Mar 11, 2019 · 2 comments
Open

replacing underscore with space #9

marczz opened this issue Mar 11, 2019 · 2 comments

Comments

@marczz
Copy link

marczz commented Mar 11, 2019

I don't do a pull request for that, but you can use (with your Scratch use, that is no more necessary)

 {{ $.Scratch.Set "wp_title" (replace (.Get 0) "_" " ")  }}

Of course it is untested, but I have similar code in my shortcodes.

@parsiya
Copy link
Owner

parsiya commented May 27, 2019

Thanks for letting me know and apologies for the delay. It's a been a very busy few months. Seems like I skipped the conversion from "_" to space based on my comments.

@bhdicaire
Copy link

bhdicaire commented Nov 7, 2020

The function you're looking for is named humanize.

{{ $.Scratch.get "wp_title" | humanize }}

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

No branches or pull requests

3 participants