class Opal::Nodes::XStringNode

def self.strip_empty_children(children)

}
foo()
%x{
# children before and after `foo()`
# this will generate two additional empty
@example

Will remove empty :str lines coming from cosmetic newlines in x-strings
def self.strip_empty_children(children)
  children = children.dup
  empty_line = ->(child) { child.nil? || (child.type == :str && child.loc.expression.source.rstrip.empty?) }
  children.shift while children.any? && empty_line[children.first]
  children.pop while children.any? && empty_line[children.last]
  children
end