Skip to content

Commit 78d52ec

Browse files
committed
Create a formatter for each call.
1 parent b343924 commit 78d52ec

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Aztec/Classes/TextKit/Configuration.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ public final class Configuration {
44

55
public static var headersWithBoldTrait = false
66

7-
static var defaultBoldFormatter: AttributeFormatter = {
8-
if headersWithBoldTrait {
9-
return BoldWithShadowForHeadingFormatter()
10-
} else {
11-
return BoldFormatter()
7+
static var defaultBoldFormatter: AttributeFormatter {
8+
get {
9+
if headersWithBoldTrait {
10+
return BoldWithShadowForHeadingFormatter()
11+
} else {
12+
return BoldFormatter()
13+
}
1214
}
13-
} ()
15+
}
1416
}

0 commit comments

Comments
 (0)