mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
tpl/transform: Fix it when template.HTML is passes as option to Hightlight
Fixes #9591
This commit is contained in:
@@ -122,10 +122,13 @@ func applyOptions(opts interface{}, cfg *Config) error {
|
||||
switch vv := opts.(type) {
|
||||
case map[string]interface{}:
|
||||
return applyOptionsFromMap(vv, cfg)
|
||||
case string:
|
||||
return applyOptionsFromString(vv, cfg)
|
||||
default:
|
||||
s, err := cast.ToStringE(opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return applyOptionsFromString(s, cfg)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func applyOptionsFromString(opts string, cfg *Config) error {
|
||||
|
Reference in New Issue
Block a user