Allow empty filter contents
This commit is contained in:
parent
49bec786cd
commit
8a1d8b1e27
|
@ -47,6 +47,7 @@ module Hamlit
|
||||||
end
|
end
|
||||||
|
|
||||||
def compile(node)
|
def compile(node)
|
||||||
|
node.value[:text] ||= ''
|
||||||
find_compiler(node.value[:name]).compile(node)
|
find_compiler(node.value[:name]).compile(node)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ module PrettyHamlit
|
||||||
end
|
end
|
||||||
|
|
||||||
def compile(node, indent_level)
|
def compile(node, indent_level)
|
||||||
|
node.value[:text] ||= ''
|
||||||
content = find_compiler(node.value[:name]).compile(node)
|
content = find_compiler(node.value[:name]).compile(node)
|
||||||
[:multi,
|
[:multi,
|
||||||
[:code, "#{@options[:buffer]} << ::PrettyHamlit::DynamicIndentation.indent_with(#{indent_level}) do |#{@options[:buffer]}|"],
|
[:code, "#{@options[:buffer]} << ::PrettyHamlit::DynamicIndentation.indent_with(#{indent_level}) do |#{@options[:buffer]}|"],
|
||||||
|
|
Loading…
Reference in New Issue