Skip to content

Commit

Permalink
Fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Jan 18, 2025
1 parent e2d1c50 commit b2257e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo/NewTabPage/DefaultsFavoritesActionHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ final class DefaultFavoritesActionsHandler: FavoritesActionsHandling {

extension Bookmark: NewTabPageFavorite {
private enum Const {
static let wwwPreffix = "www."
static let wwwPrefix = "www."
}

var etldPlusOne: String? {
guard let domain = urlObject?.host else {
return nil
}
return ContentBlocking.shared.tld.eTLDplus1(domain)?.dropping(prefix: Const.wwwPreffix)
return ContentBlocking.shared.tld.eTLDplus1(domain)?.dropping(prefix: Const.wwwPrefix)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public struct LetterIconView: View {
public var characterCount: Int
private var paddingModifier: CGFloat
private var font: Font
private static let wwwPreffix = "www."
private static let wwwPrefix = "www."

private var characters: String {
if let prefferedFirstCharacters = prefferedFirstCharacters,
prefferedFirstCharacters != "" {
return String(prefferedFirstCharacters.prefix(characterCount))
}
return String(title.replacingOccurrences(of: Self.wwwPreffix, with: "").prefix(characterCount))
return String(title.replacingOccurrences(of: Self.wwwPrefix, with: "").prefix(characterCount))
}

/// Initializes a `LetterIconView`
Expand Down

0 comments on commit b2257e1

Please sign in to comment.