Allow empty filter contents

This commit is contained in:
Takashi Kokubun 2015-11-13 21:37:04 +09:00
parent 49bec786cd
commit 8a1d8b1e27
2 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,7 @@ module Hamlit
end
def compile(node)
node.value[:text] ||= ''
find_compiler(node.value[:name]).compile(node)
end

View File

@ -22,6 +22,7 @@ module PrettyHamlit
end
def compile(node, indent_level)
node.value[:text] ||= ''
content = find_compiler(node.value[:name]).compile(node)
[:multi,
[:code, "#{@options[:buffer]} << ::PrettyHamlit::DynamicIndentation.indent_with(#{indent_level}) do |#{@options[:buffer]}|"],