lib/wlang/template.rb in wlang-2.3.0 vs lib/wlang/template.rb in wlang-2.3.1
- old
+ new
@@ -58,12 +58,17 @@
opt = options[:yaml_front_matter]
opt.nil? or opt
end
def call_args_conventions(args)
+ # Ensure a buffer as lat argument
args << '' unless args.last.respond_to?(:<<)
buffer = args.pop
+
+ # puts locals if any
args << self.locals unless self.locals.empty?
+
+ # create a scope now
scope = WLang::Scope.chain(args)
[scope, buffer]
end
end # class Template