1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Remove newline from ruby filter

This commit is contained in:
Takashi Kokubun 2015-03-30 11:01:20 +09:00
parent 5e56819899
commit b8669fed4b
2 changed files with 1 additions and 3 deletions

View file

@ -111,6 +111,7 @@ module Hamlit
def skip_newline?(ast)
SKIP_NEWLINE_EXPS.include?(ast.first) ||
(ast[0..1] == [:haml, :doctype]) ||
(ast[0..2] == [:haml, :filter, 'ruby']) ||
@outer_removal.include?(@current_indent)
end
end

View file

@ -1,13 +1,11 @@
require 'spec_helper'
# FIXME: newline should be removed
describe Hamlit::Filters::Ruby do
it 'renders ruby filter' do
assert_render(<<-HAML, <<-HTML)
:ruby
hello
HAML
hello
HTML
end
@ -20,7 +18,6 @@ describe Hamlit::Filters::Ruby do
}
= hash[:a]
HAML
3
HTML
end