File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Shared/Supporting Files/Views Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -134,13 +134,10 @@ private extension String {
134134 var attributedString = AttributedString ( self )
135135
136136 let trimmedSubstring = substring. trimmingCharacters ( in: . whitespacesAndNewlines)
137- if let range = localizedStandardRange ( of: trimmedSubstring) {
138- let substring = self [ range]
139-
140- if let boldedSubstring = try ? AttributedString ( markdown: " ** \( substring) ** " ) ,
141- let attributedRange = attributedString. range ( of: substring) {
142- attributedString. replaceSubrange ( attributedRange, with: boldedSubstring)
143- }
137+ if let range = localizedStandardRange ( of: trimmedSubstring) ,
138+ let boldedSubstring = try ? AttributedString ( markdown: " ** \( self [ range] ) ** " ) ,
139+ let attributedRange = attributedString. range ( of: self [ range] ) {
140+ attributedString. replaceSubrange ( attributedRange, with: boldedSubstring)
144141 }
145142
146143 return attributedString
You can’t perform that action at this time.
0 commit comments