diff options
author | Unknwon <u@gogs.io> | 2017-03-10 23:30:40 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-10 23:30:40 -0500 |
commit | ac8b1e595fa7ace7e2539276355954b2dceeb388 (patch) | |
tree | f343648f9130b7a9dcdf2436f6836a8a757d2689 /modules/setting/setting.go | |
parent | 31c55213ff480f9a21ea4e4b5ea3add6bc8d3c3f (diff) |
markdown: support Smartypants (#4162)
Added new config section '[smartypants]', and disabled by default.
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index ed04665e..cc83de7d 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -153,6 +153,15 @@ var ( FileExtensions []string } + // Smartypants settings + Smartypants struct { + Enabled bool + Fractions bool + Dashes bool + LatexDashes bool + AngledQuotes bool + } + // Admin settings Admin struct { DisableRegularOrgCreation bool @@ -583,6 +592,8 @@ func NewContext() { log.Fatal(2, "Fail to map Webhook settings: %v", err) } else if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil { log.Fatal(2, "Fail to map Markdown settings: %v", err) + } else if err = Cfg.Section("smartypants").MapTo(&Smartypants); err != nil { + log.Fatal(2, "Fail to map Smartypants settings: %v", err) } else if err = Cfg.Section("admin").MapTo(&Admin); err != nil { log.Fatal(2, "Fail to map Admin settings: %v", err) } else if err = Cfg.Section("cron").MapTo(&Cron); err != nil { |