1 Commits

Author SHA1 Message Date
Kyle Fuller
974b9c85a0 feat(template): Restore open state 2016-12-01 18:41:25 +00:00
3 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,11 @@
# Stencil Changelog # Stencil Changelog
## 0.7.2
### Enhancements
- `Template` is now an `open` class.
## 0.7.1 ## 0.7.1
### Bug Fixes ### Bug Fixes

View File

@@ -6,7 +6,7 @@ let NSFileNoSuchFileError = 4
#endif #endif
/// A class representing a template /// A class representing a template
public class Template: ExpressibleByStringLiteral { open class Template: ExpressibleByStringLiteral {
let tokens: [Token] let tokens: [Token]
/// Create a template with a template string /// Create a template with a template string
@@ -51,7 +51,7 @@ public class Template: ExpressibleByStringLiteral {
} }
/// Render the given template /// 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 context = context ?? Context()
let parser = TokenParser(tokens: tokens, namespace: context.namespace) let parser = TokenParser(tokens: tokens, namespace: context.namespace)
let nodes = try parser.parse() let nodes = try parser.parse()

View File

@@ -1,6 +1,6 @@
{ {
"name": "Stencil", "name": "Stencil",
"version": "0.7.1", "version": "0.7.2",
"summary": "Stencil is a simple and powerful template language for Swift.", "summary": "Stencil is a simple and powerful template language for Swift.",
"homepage": "https://stencil.fuller.li", "homepage": "https://stencil.fuller.li",
"license": { "license": {
@@ -13,7 +13,7 @@
"social_media_url": "https://twitter.com/kylefuller", "social_media_url": "https://twitter.com/kylefuller",
"source": { "source": {
"git": "https://github.com/kylef/Stencil.git", "git": "https://github.com/kylef/Stencil.git",
"tag": "0.7.1" "tag": "0.7.2"
}, },
"source_files": [ "source_files": [
"Sources/*.swift" "Sources/*.swift"