diff --git a/Sources/LeafKit/LeafSyntax/LeafSyntax.swift b/Sources/LeafKit/LeafSyntax/LeafSyntax.swift index dd597ed..f977fd2 100644 --- a/Sources/LeafKit/LeafSyntax/LeafSyntax.swift +++ b/Sources/LeafKit/LeafSyntax/LeafSyntax.swift @@ -85,6 +85,7 @@ extension Syntax: BodiedSyntax { .custom(let bS as BodiedSyntax), .export(let bS as BodiedSyntax), .extend(let bS as BodiedSyntax), + .with(let bS as BodiedSyntax), .loop(let bS as BodiedSyntax): return bS.externals() default: return .init() } @@ -125,6 +126,7 @@ extension Syntax: BodiedSyntax { .custom(let bS as BodiedSyntax), .export(let bS as BodiedSyntax), .extend(let bS as BodiedSyntax), + .with(let bS as BodiedSyntax), .loop(let bS as BodiedSyntax): result += bS.inlineRefs(externals, imports) case .expression(let pDA): result.append(.expression(pDA.inlineImports(imports))) // .variable, .raw diff --git a/Tests/LeafKitTests/LeafTests.swift b/Tests/LeafKitTests/LeafTests.swift index 2825e9c..de4c302 100644 --- a/Tests/LeafKitTests/LeafTests.swift +++ b/Tests/LeafKitTests/LeafTests.swift @@ -224,6 +224,34 @@ final class LeafTests: XCTestCase { try XCTAssertEqual(render(template, ["parent": ["child": "Elizabeth"]]), expected) } + func testWithWrappingExtend() throws { + let header = """ +