Merge pull request #322 from stencilproject/feature/public-render
Make `render` method public
This commit is contained in:
@@ -9,6 +9,9 @@ _None_
|
|||||||
- Made the `tokens` property on a `Template` public.
|
- Made the `tokens` property on a `Template` public.
|
||||||
[Stefanomondino](https://github.com/stefanomondino)
|
[Stefanomondino](https://github.com/stefanomondino)
|
||||||
[#292](https://github.com/stencilproject/Stencil/pull/292)
|
[#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
|
### Deprecations
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ open class Template: ExpressibleByStringLiteral {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Render the given template with a context
|
/// Render the given template with a context
|
||||||
func render(_ context: Context) throws -> String {
|
public func render(_ context: Context) throws -> String {
|
||||||
let context = context
|
let context = context
|
||||||
let parser = TokenParser(tokens: tokens, environment: context.environment)
|
let parser = TokenParser(tokens: tokens, environment: context.environment)
|
||||||
let nodes = try parser.parse()
|
let nodes = try parser.parse()
|
||||||
|
|||||||
Reference in New Issue
Block a user