During development, I came across an issue that I would like to report an discuss:
I authored a custom render hook for a code block. Then I used this code block in my page and passed attributes to the newly created render hook:
```my-customblock { color=red dimensions=XL }
BODY
```
With this code, a filled map is correctly passed to my render hook (accessible via .Attributes
):
map[color:red dimensions:XL]
However, using this code
```my-customblock { color=red dimensions=300x200 }
BODY
```
an empty map is passed to my render hook:
map[]
This was unexpected, I soon realized that you have to quote the value 300x200
in order to make it work:
```my-customblock { color="red" dimensions="300x200" }
BODY
```
Now my issue: I consider discarding given values and passing an empty map as error, but currently hugo
silently ignores this error situation. IMHO hugo
should be more strict here and emit an error (or at least a warning). No idea if this is something that can be achieved easily. WDYT?