You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TextBuilder accepts `String` types directly as if they were plain `Text`, and also provides a `String.text` computed var to remove unwanted code noise when `Text` is explicitly needed.
62
62
63
63
```swift
64
-
@MultilineTextBuilder
64
+
@TextBuilderWithNewlines
65
65
var loremIpsum: Text {
66
66
"Lorem".text.underline().foregroundColor(.blue)
67
67
"ipsum dolor"
@@ -91,10 +91,10 @@ But if you prefer to keep using a result builder, you can:
91
91
92
92
```swift
93
93
structEggplantSeparator: TextBuilderSeparator {
94
-
staticvar separator: String { " 🍆 " }
94
+
staticvar separator: String? { " 🍆 " }
95
95
}
96
96
97
-
@TextBuilder<EggplantSeparator>
97
+
@TextBuilderWith<EggplantSeparator>
98
98
var loremIpsum: Text {
99
99
"Lorem".text.underline().foregroundColor(.blue)
100
100
"ipsum dolor"
@@ -116,6 +116,6 @@ $ swift run -c release Benchmarks
0 commit comments