module Haml::Precompiler
def handle_multiline(line)
This returns whether or not the line should be
the beginning, continuation, or end of a multiline sequence.
Deals with all the logic of figuring out whether a given line is
def handle_multiline(line) text = line.text # A multiline string is active, and is being continued if is_multiline?(text) && @multiline @multiline.text << text[0...-1] return true end # A multiline string has just been activated, start adding the lines if is_multiline?(text) && (MULTILINE_STARTERS.include? text[0]) @multiline = Line.new text[0...-1], nil, line.index, nil, line.tabs process_indent(line) return true end # A multiline string has just ended, make line into the result if @multiline && !line.text.empty? process_line(@multiline.text, @multiline.index, line.tabs > @multiline.tabs) @multiline = nil end return false end