From 99cc1cac4a765932ef4c2f16d32ba21928199ac0 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 26 Jul 2022 15:08:30 +0200 Subject: [PATCH 1/2] Make render with context public --- Sources/Template.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Template.swift b/Sources/Template.swift index 75db2f5d..c07be628 100644 --- a/Sources/Template.swift +++ b/Sources/Template.swift @@ -67,7 +67,7 @@ open class Template: ExpressibleByStringLiteral { } /// Render the given template with a context - func render(_ context: Context) throws -> String { + public func render(_ context: Context) throws -> String { let context = context let parser = TokenParser(tokens: tokens, environment: context.environment) let nodes = try parser.parse() From ee8b4bc4bc5d5e4ebb0eb2b81147b38fd20371f1 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 26 Jul 2022 22:55:26 +0200 Subject: [PATCH 2/2] Changelog entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e30b8c70..1c10086f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ _None_ - Made the `tokens` property on a `Template` public. [Stefanomondino](https://github.com/stefanomondino) [#292](https://github.com/stencilproject/Stencil/pull/292) +- Made the `Template.render(_:)` method (that accepts a `Context`) public. + [David Jennes](https://github.com/djbe) + [#322](https://github.com/stencilproject/Stencil/pull/322) ### Deprecations