File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -73,21 +73,14 @@ struct HTMLElement : ExpressionMacro {
73
73
#endif
74
74
75
75
#if canImport(NIOCore)
76
- case . byteBuffer: return " ByteBuffer(string: \( raw: string) ) "
76
+ case . byteBuffer: return " ByteBuffer(string: \" \ ( raw: string) \" ) "
77
77
#endif
78
78
79
79
default : return " \" \( raw: string) \" "
80
80
}
81
81
}
82
82
}
83
83
84
- extension HTMLDataRepresentation {
85
- enum Result {
86
- case string( String )
87
- case uint8Array( [ UInt8 ] )
88
- }
89
- }
90
-
91
84
private extension HTMLElement {
92
85
static func parse_macro( context: some MacroExpansionContext , expression: MacroExpansionExprSyntax ) -> String {
93
86
guard let elementType: HTMLElementType = HTMLElementType ( rawValue: expression. macroName. text) else { return " \( expression) " }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ struct HTMLKitTests {
43
43
}
44
44
45
45
extension HTMLKitTests {
46
- func representation1 ( ) {
46
+ func representations ( ) {
47
47
let _: StaticString = #html( representation: . string)
48
48
let _: String = #html( representation: . string)
49
49
let _: [ UInt8 ] = #html( representation: . uint8Array)
@@ -52,25 +52,25 @@ extension HTMLKitTests {
52
52
let _: Data = #html( representation: . data)
53
53
#endif
54
54
#if canImport(NIOCore)
55
- let _: [ ByteBuffer ] = #html( representation: . byteBuffer)
55
+ let _: ByteBuffer = #html( representation: . byteBuffer)
56
56
#endif
57
57
}
58
- func representation2 ( ) -> StaticString {
58
+ func representation1 ( ) -> StaticString {
59
59
#html( )
60
60
}
61
- func representation3 ( ) -> String {
61
+ func representation2 ( ) -> String {
62
62
#html( )
63
63
}
64
- func representation4 ( ) -> [ UInt8 ] {
64
+ func representation3 ( ) -> [ UInt8 ] {
65
65
#html( )
66
66
}
67
67
#if canImport(Foundation)
68
- func representation5 ( ) -> Data {
68
+ func representation4 ( ) -> Data {
69
69
#html( )
70
70
}
71
71
#endif
72
72
#if canImport(NIOCore)
73
- func representation6 ( ) -> ByteBuffer {
73
+ func representation5 ( ) -> ByteBuffer {
74
74
#html( )
75
75
}
76
76
#endif
You can’t perform that action at this time.
0 commit comments