module Haml::Precompiler
def next_line
def next_line text, index = raw_next_line return unless text # :eod is a special end-of-document marker line = if text == :eod Line.new '-#', '-#', '-#', index, self, true else Line.new text.strip, text.lstrip.chomp, text, index, self, false end # `flat?' here is a little outdated, # so we have to manually check if either the previous or current line # closes the flat block, # as well as whether a new block is opened @line.tabs if @line unless (flat? && !closes_flat?(line) && !closes_flat?(@line)) || (@line && @line.text[0] == ?: && line.full =~ %r[^#{@line.full[/^\s+/]}\s]) if line.text.empty? newline return next_line end handle_multiline(line) end @next_line = line end