mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Support typed bool, int and float in shortcode params
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
This commit is contained in:
parent
e073f4efb1
commit
329e88db1f
12 changed files with 202 additions and 53 deletions
|
@ -80,7 +80,7 @@ func (t *Iterator) Input() []byte {
|
|||
return t.l.Input()
|
||||
}
|
||||
|
||||
var errIndexOutOfBounds = Item{tError, 0, []byte("no more tokens")}
|
||||
var errIndexOutOfBounds = Item{tError, 0, []byte("no more tokens"), true}
|
||||
|
||||
// Current will repeatably return the current item.
|
||||
func (t *Iterator) Current() Item {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue