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:
Sam
2015-03-13 16:18:59 +11:00
parent 1e339ad527
commit a82530012a
137 changed files with 277 additions and 26 deletions
+8 -3
View File
@@ -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]