module Haml::Precompiler

def count_soft_tabs(line)

Counts the tabulation of a line.
def count_soft_tabs(line)
  spaces = line.index(/([^ ]|$)/)
  if line[spaces] == ?\t
    return 0, 0 if line.strip.empty?
    raise SyntaxError.new(<<END.strip, @next_line.index)
b character was used for indentation. Haml must be indented using two spaces.
you sure you have soft tabs enabled in your editor?
  end
  [spaces, spaces/2]
end