diff --git a/MacroExamplesPlugin/CustomCodable.swift b/MacroExamplesPlugin/CustomCodable.swift index d45976d..c9fdc05 100644 --- a/MacroExamplesPlugin/CustomCodable.swift +++ b/MacroExamplesPlugin/CustomCodable.swift @@ -34,8 +34,7 @@ public struct CustomCodable: MemberMacro { let codingKeys: DeclSyntax = """ - enum CodingKeys: String, CodingKey { - \(raw: cases.joined(separator: "\n")) + enum CodingKeys: String, CodingKey {\n\(raw: cases.joined(separator: "\n")) } """ diff --git a/MacroExamplesPlugin/ObservableMacro.swift b/MacroExamplesPlugin/ObservableMacro.swift index 16ee346..74ccfaa 100644 --- a/MacroExamplesPlugin/ObservableMacro.swift +++ b/MacroExamplesPlugin/ObservableMacro.swift @@ -28,7 +28,7 @@ public struct ObservableMacro: MemberMacro, MemberAttributeMacro { return [] } - let parentName = identified.identifier + let parentName = identified.identifier.trimmed let registrar: DeclSyntax = """