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

Add a convenience case for string arrays in HTML attributes #40

Open
wilzbach opened this issue Dec 4, 2017 · 1 comment
Open

Add a convenience case for string arrays in HTML attributes #40

wilzbach opened this issue Dec 4, 2017 · 1 comment

Comments

@wilzbach
Copy link
Contributor

wilzbach commented Dec 4, 2017

- auto myClasses = ["foo", "bar"];
div(class="#{myClasses}")

should yield:

<div class="foo bar" />

See also: dlang/ddox#171

wilzbach added a commit to wilzbach/diet-ng that referenced this issue Dec 4, 2017
wilzbach added a commit to wilzbach/diet-ng that referenced this issue Dec 5, 2017
@schveiguy
Copy link
Contributor

I imagine you can define a type Classes that takes care of this, no? Then it becomes:

- auto myClasses = Classes("foo", "bar");
div(class="#{myClasses}")

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

2 participants