feat(template): Restore open state
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Stencil Changelog
|
||||
|
||||
## 0.7.2
|
||||
|
||||
### Enhancements
|
||||
|
||||
- `Template` is now an `open` class.
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -6,7 +6,7 @@ let NSFileNoSuchFileError = 4
|
||||
#endif
|
||||
|
||||
/// A class representing a template
|
||||
public class Template: ExpressibleByStringLiteral {
|
||||
open class Template: ExpressibleByStringLiteral {
|
||||
let tokens: [Token]
|
||||
|
||||
/// Create a template with a template string
|
||||
@@ -51,7 +51,7 @@ public class Template: ExpressibleByStringLiteral {
|
||||
}
|
||||
|
||||
/// Render the given template
|
||||
public func render(_ context: Context? = nil) throws -> String {
|
||||
open func render(_ context: Context? = nil) throws -> String {
|
||||
let context = context ?? Context()
|
||||
let parser = TokenParser(tokens: tokens, namespace: context.namespace)
|
||||
let nodes = try parser.parse()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Stencil",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"summary": "Stencil is a simple and powerful template language for Swift.",
|
||||
"homepage": "https://stencil.fuller.li",
|
||||
"license": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"social_media_url": "https://twitter.com/kylefuller",
|
||||
"source": {
|
||||
"git": "https://github.com/kylef/Stencil.git",
|
||||
"tag": "0.7.1"
|
||||
"tag": "0.7.2"
|
||||
},
|
||||
"source_files": [
|
||||
"Sources/*.swift"
|
||||
|
||||
Reference in New Issue
Block a user