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:
parent
5e56819899
commit
b8669fed4b
2 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue