mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Remove support for FontAwesome 4.7 icon names (#9871)
This commit is contained in:
@@ -421,18 +421,10 @@ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL
|
||||
icons
|
||||
end
|
||||
|
||||
def self.fa4_shim_file
|
||||
"#{Rails.root}/lib/svg_sprite/fa4-renames.json"
|
||||
end
|
||||
|
||||
def self.fa4_to_fa5_names
|
||||
@db ||= File.open(fa4_shim_file, "r:UTF-8") { |f| JSON.parse(f.read) }
|
||||
end
|
||||
|
||||
def self.process(icon_name)
|
||||
icon_name = icon_name.strip
|
||||
FA_ICON_MAP.each { |k, v| icon_name = icon_name.sub(k, v) }
|
||||
fa4_to_fa5_names[icon_name] || icon_name
|
||||
icon_name
|
||||
end
|
||||
|
||||
def self.get_set_cache(key)
|
||||
|
||||
Reference in New Issue
Block a user