Skip to content

Commit

Permalink
Fix version number in podspec + fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrmarin committed Jul 9, 2024
1 parent 82ac283 commit 6064261
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions Sources/StylableSwiftUI/StylistIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public struct StylistIdentifier: Equatable, Hashable {

/// Given the identifier `header/searchBar/title` then the components are `[ "header", "searchBar" ]`
public let path: Path


/// Creates a new `StylistIdentifier` with a token and path
/// - Parameters:
/// - token: Given the identifier `header/searchBar/title` then `title` is the token
/// - path: Given the identifier `header/searchBar/title` then the components are `[ "header", "searchBar" ]`
public init(token: String, path: Path) {
self.token = token
self.path = path
Expand Down Expand Up @@ -127,7 +131,7 @@ public extension StylistIdentifier {
static let empty = Path(components: [])
}

struct Component: CustomStringConvertible, Equatable, Hashable {
struct Component: CustomStringConvertible, Equatable, Hashable {
let value: String
let variant: String?

Expand All @@ -147,11 +151,10 @@ public extension StylistIdentifier {
self.value = split.first.map(String.init) ?? ""

// Get, validate, and store the variant (or just let it be `nil`)
guard
let variant = split.second.map(String.init).map({ $0.hasSuffix("]") ? String($0.dropLast()) : $0 }),
!variant.isEmpty else {
self.variant = nil
return
guard let variant = split.second.map(String.init).map({ $0.hasSuffix("]") ? String($0.dropLast()) : $0 }),
!variant.isEmpty else {
self.variant = nil
return
}
self.variant = variant
}
Expand Down
2 changes: 1 addition & 1 deletion StylableSwiftUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'StylableSwiftUI'
s.version = '4.0.1'
s.version = '5.0.0'
s.summary = 'StylableSwiftUI - Style SwiftUI apps and libraries'
s.description = <<-DESC
Easily tag a SwiftUI library so it can be styled by multiple apps.
Expand Down

0 comments on commit 6064261

Please sign in to comment.