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

Support typed bool, int and float in shortcode params #6376

Merged
merged 1 commit into from Sep 29, 2019

Conversation

@bep
Copy link
Member

bep commented Sep 29, 2019

This means that you now can do:

{{< vidur 9KvBeKu false true 32 3.14 >}}

And the boolean and numeric values will be converted to bool, int and float64.

If you want these to be strings, they must be quoted:

{{< vidur 9KvBeKu "false" "true" "32" "3.14" >}}

Fixes #6371

@bep bep force-pushed the bep:shortcode-bool2 branch 3 times, most recently from 3ec5904 to 67cf919 Sep 29, 2019
This means that you now can do:

    {{< vidur 9KvBeKu false true 32 3.14 >}}

And the boolean and numeric values will be converted to `bool`, `int` and `float64`.

If you want these to be  strings, they must be quoted:

    {{< vidur 9KvBeKu "false" "true" "32" "3.14" >}}

Fixes #6371
@bep bep force-pushed the bep:shortcode-bool2 branch from 67cf919 to 6379596 Sep 29, 2019
@bep bep merged commit 329e88d into gohugoio:master Sep 29, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@bep bep referenced this pull request Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.