File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,15 @@ public extension Guid {
182
182
183
183
There are other built-in type-safe attribute modifiers available on tags.
184
184
185
-
185
+
186
186
## Composing tags
187
187
188
188
You can come up with your own ` Tag ` composition system by introducing a new protocol.
189
189
190
190
``` swift
191
191
protocol TagRepresentable {
192
192
193
+ @TagBuilder
193
194
func build () -> Tag
194
195
}
195
196
@@ -201,7 +202,6 @@ struct ListComponent: TagRepresentable {
201
202
self .items = items
202
203
}
203
204
204
- @TagBuilder
205
205
func build () -> Tag {
206
206
Ul {
207
207
for item in items {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import XCTest
9
9
@testable import SwiftHtml
10
10
11
11
protocol TagRepresentable {
12
-
12
+ @ TagBuilder
13
13
func build( ) -> Tag
14
14
}
15
15
@@ -32,7 +32,6 @@ struct ListComponent: TagRepresentable {
32
32
self . items = items
33
33
}
34
34
35
- @TagBuilder
36
35
func build( ) -> Tag {
37
36
Ul {
38
37
for item in items {
You can’t perform that action at this time.
0 commit comments