mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:55:39 -05: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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user