removed trailing witespaces
This commit is contained in:
@@ -16,7 +16,7 @@ class BlockContext {
|
||||
self.blocks[blockName] = [block]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func popBlock(named blockName: String) -> BlockNode? {
|
||||
if var blocks = blocks[blockName] {
|
||||
let block = blocks.removeFirst()
|
||||
@@ -86,7 +86,7 @@ class ExtendsNode : NodeType {
|
||||
}
|
||||
|
||||
let baseTemplate = try context.environment.loadTemplate(name: templateName)
|
||||
|
||||
|
||||
let blockContext: BlockContext
|
||||
if let _blockContext = context[BlockContext.contextKey] as? BlockContext {
|
||||
blockContext = _blockContext
|
||||
@@ -148,7 +148,7 @@ class BlockNode : NodeType {
|
||||
// child node is a block node from child template that extends this node (has the same name)
|
||||
|
||||
var newContext: [String: Any] = [BlockContext.contextKey: blockContext]
|
||||
|
||||
|
||||
if let blockSuperNode = child.nodes.first(where: {
|
||||
if case .variable(let variable, _)? = $0.token, variable == "block.super" { return true }
|
||||
else { return false}
|
||||
@@ -170,7 +170,7 @@ class BlockNode : NodeType {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// render extension node
|
||||
do {
|
||||
return try context.push(dictionary: newContext) {
|
||||
|
||||
Reference in New Issue
Block a user