def load styles
      styles += '.yml' unless styles =~ /\.ya?ml$/
      styles = File.join(File.dirname(__FILE__), "styles", styles) unless File.exist? styles
      YAML.load_file(styles).inject({}) do |h, (key, value)|
        value = { :match => value['match'], :style => value['style'] }
        h.merge key.to_sym => value
      end
    end
def load styles
      styles += '.yml' unless styles =~ /\.ya?ml$/
      styles = File.join(File.dirname(__FILE__), "styles", styles) unless File.exist? styles
      YAML.load_file(styles).inject({}) do |h, (key, value)|
        value = { :match => value['match'], :style => value['style'] }
        h.merge key.to_sym => value
      end
    end
Loads styles from a YAML style-sheet,
   and converts the keys to symbols