Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oscbyspro committed Aug 30, 2022
1 parent ae6957f commit bbd4666
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Sources/DiffableTextKitXPattern/Style.swift
Expand Up @@ -40,20 +40,24 @@ Value: RangeReplaceableCollection, Value.Element == Character {

/// Marks a single character as the style's placeholder.
@inlinable public func placeholders(_ character: Character,
where predicate: @escaping (Character) -> Bool) -> Self {
where predicate: @escaping (Character) -> Bool) -> Self {
self.placeholders((character, predicate))
}

/// Marks a single character as the style's placeholder.
@inlinable public func placeholders(_ some: (Character, (Character) -> Bool)) -> Self {
var S0 = self; S0.placeholders = .init(some); return S0
var S0 = self; S0.placeholders = Placeholders(some); return S0
}

/// Marks multiple characters as the style's placeholders.
@inlinable public func placeholders(_ many: [Character: (Character) -> Bool]) -> Self {
var S0 = self; S0.placeholders = .init(many); return S0
var S0 = self; S0.placeholders = Placeholders(many); return S0
}

//=------------------------------------------------------------------------=
// MARK: Transformations
//=------------------------------------------------------------------------=

/// Hides the pattern's suffix.
///
/// Characters after the last value, or from the first placeholder, are excluded.
Expand Down
Expand Up @@ -45,7 +45,7 @@ public extension View {
///
/// ```
/// TextField("Amount", value: $amount, style: .currency("USD"))
/// .keyboardType(.decimalPad)
/// .diffableTextViews_keyboardType(.decimalPad)
/// ```
///
/// **Notes**
Expand Down
Expand Up @@ -45,7 +45,7 @@ public extension View {
///
/// ```
/// DiffableTextField("Amount", value: $value, style: .number)
/// .multilineTextAlignment(.trailing)
/// .diffableTextViews_multilineTextAlignment(.trailing)
/// ```
///
/// **Notes**
Expand Down

0 comments on commit bbd4666

Please sign in to comment.