Skip to content

Commit

Permalink
Also drop hass: from icon names (#1264)
Browse files Browse the repository at this point in the history
This PR simply uses a little regex to check for `hass:` in addition to `mdi:`.
  • Loading branch information
TomBrien committed Nov 16, 2020
1 parent 55d472c commit 1bd1b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Shared/Common/Extensions/UIImage+Icons.swift
Expand Up @@ -48,7 +48,7 @@ public extension MaterialDesignIcons {
internal extension String {
var normalizingIconString: String {
return self
.replacingOccurrences(of: "mdi:", with: "")
.replacingOccurrences(of: "mdi:|hass:", with: "", options: .regularExpression)
.replacingOccurrences(of: ":", with: "_")
.replacingOccurrences(of: "-", with: "_")
}
Expand Down

0 comments on commit 1bd1b63

Please sign in to comment.