Skip to content

Commit

Permalink
Stop using bare slash regex literals
Browse files Browse the repository at this point in the history
  • Loading branch information
liamnichols committed Aug 4, 2024
1 parent b715b17 commit 58f3976
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Sources/StringGenerator/StringGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@ private extension String {
// https://github.com/liamnichols/xcstrings-tool/issues/97
func patchingSwift6CompatibilityIssuesIfNeeded() -> String {
#if !canImport(SwiftSyntax600)
#if hasFeature(BareSlashRegexLiterals)
replacing(/(?:[#@]available|==)\s\(/, with: { match in
match.output.filter { !$0.isWhitespace }
})
#else
replacing(#/(?:[#@]available|==)\s\(/#, with: { match in
match.output.filter { !$0.isWhitespace }
})
#endif
#else
self
#endif
Expand Down

0 comments on commit 58f3976

Please sign in to comment.