mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
@@ -58,6 +58,8 @@ type Config struct {
|
||||
|
||||
// TabWidth sets the number of characters for a tab. Defaults to 4.
|
||||
TabWidth int
|
||||
|
||||
GuessSyntax bool
|
||||
}
|
||||
|
||||
func (cfg Config) ToHTMLOptions() []html.Option {
|
||||
@@ -104,6 +106,10 @@ func ApplyLegacyConfig(cfg config.Provider, conf *Config) error {
|
||||
conf.CodeFences = cfg.GetBool("pygmentsCodeFences")
|
||||
}
|
||||
|
||||
if conf.GuessSyntax == DefaultConfig.GuessSyntax && cfg.IsSet("pygmentsCodefencesGuessSyntax") {
|
||||
conf.GuessSyntax = cfg.GetBool("pygmentsCodefencesGuessSyntax")
|
||||
}
|
||||
|
||||
if cfg.IsSet("pygmentsOptions") {
|
||||
if err := applyOptionsFromString(cfg.GetString("pygmentsOptions"), conf); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user