Skip to content

Commit

Permalink
Merge pull request #322 from stencilproject/feature/public-render
Browse files Browse the repository at this point in the history
Make `render` method public
  • Loading branch information
djbe authored Jul 27, 2022
2 parents 779820e + ee8b4bc commit a6d0428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Sources/Template.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a6d0428

Please sign in to comment.