mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
FEATURE: Allow selection of highlight js languages
PERF: stop loading highlight js on load To get latest highlight js run bin/rake highlightjs:update
This commit is contained in:
parent
1e339ad527
commit
a82530012a
137 changed files with 277 additions and 26 deletions
|
@ -78,10 +78,15 @@ module SiteSettingExtension
|
|||
opts[:type] ||= :enum
|
||||
end
|
||||
|
||||
if opts[:choices]
|
||||
if new_choices = opts[:choices]
|
||||
|
||||
if String === new_choices
|
||||
new_choices = eval(new_choices)
|
||||
end
|
||||
|
||||
choices.has_key?(name) ?
|
||||
choices[name].concat(opts[:choices]) :
|
||||
choices[name] = opts[:choices]
|
||||
choices[name].concat(new_choices) :
|
||||
choices[name] = new_choices
|
||||
end
|
||||
|
||||
if type = opts[:type]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue