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

Use yield_content in whitespace #611

Merged
merged 1 commit into from Dec 9, 2023
Merged

Conversation

willcosgrove
Copy link
Contributor

This will allow the block form of whitespace to work the same way you would work with an element method. Your block can return a string, or any object that can be formatted by format_object if it contains no other element methods.

span { "9" }
whitespace { "out of" }
span { "10" }

This will allow the block form of `whitespace` to work the same way you
would work with an element method. Your block can return a string, or
any object that can be formatted by `format_object` if it contains no
other element methods.

```rb
span { "9" }
whitespace { "out of" }
span { "10" }
```
@joeldrapper joeldrapper merged commit c88b1bd into main Dec 9, 2023
17 checks passed
@joeldrapper joeldrapper deleted the yield-content-in-whitespace branch December 9, 2023 11:07
@joeldrapper
Copy link
Collaborator

Good idea! 🙌

@bradgessler
Copy link
Contributor

Dig the simplicity of this. I had a whole "we need to have a join method that handles spaces" ... this is way better.

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

Successfully merging this pull request may close these issues.

None yet

3 participants