diff options
Diffstat (limited to 'markup/highlight')
-rw-r--r-- | markup/highlight/config.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/markup/highlight/config.go b/markup/highlight/config.go index 3204ce195..1142c5e11 100644 --- a/markup/highlight/config.go +++ b/markup/highlight/config.go @@ -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 { |