Make MustacheSequence public (#38)
* Make `MustacheSequence` public * `MustacheSequence` require conformance to `Sequence` * remove protocol requirements * `MustacheContext` revert to `internal`
This commit is contained in:
@@ -101,7 +101,7 @@ extension MustacheTemplate {
|
||||
/// - Returns: Rendered text
|
||||
func renderSection(_ child: Any?, with template: MustacheTemplate, context: MustacheContext) -> String {
|
||||
switch child {
|
||||
case let array as MustacheSequence:
|
||||
case let array as any MustacheSequence:
|
||||
return array.renderSection(with: template, context: context)
|
||||
case let bool as Bool:
|
||||
return bool ? template.render(context: context) : ""
|
||||
@@ -124,7 +124,7 @@ extension MustacheTemplate {
|
||||
/// - Returns: Rendered text
|
||||
func renderInvertedSection(_ child: Any?, with template: MustacheTemplate, context: MustacheContext) -> String {
|
||||
switch child {
|
||||
case let array as MustacheSequence:
|
||||
case let array as any MustacheSequence:
|
||||
return array.renderInvertedSection(with: template, context: context)
|
||||
case let bool as Bool:
|
||||
return bool ? "" : template.render(context: context)
|
||||
|
||||
Reference in New Issue
Block a user