--HAML--
%html
  :javascript
    if (foo) {
            alert('hey!');
    }
  foo

--EXPECT--
root(
  tag(html
    filter(javascript
      interpolated(text(if (foo) {))
      interpolated(text(        alert('hey!');))
      interpolated(text(}))
    )
    interpolated(text(foo))
  )
)

