Fix issues from Inheritance spec (#36)
* Separate inheritance block and expansion * Catch top level partial definition, and block newlines * Add testTrailingNewLines to verify output of trailing newlines in partials * Remove comment * If block,partial has indentation add indent for first line * Re-enable full sections spec * withBlockExpansion * Get indentation of blocks correct
This commit is contained in:
@@ -38,7 +38,8 @@ public struct MustacheTemplate: Sendable {
|
||||
case unescapedVariable(name: String, transforms: [String] = [])
|
||||
case section(name: String, transforms: [String] = [], template: MustacheTemplate)
|
||||
case invertedSection(name: String, transforms: [String] = [], template: MustacheTemplate)
|
||||
case inheritedSection(name: String, template: MustacheTemplate)
|
||||
case blockDefinition(name: String, template: MustacheTemplate)
|
||||
case blockExpansion(name: String, default: MustacheTemplate, indentation: String?)
|
||||
case partial(String, indentation: String?, inherits: [String: MustacheTemplate]?)
|
||||
case contentType(MustacheContentType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user