lib/ruco/syntax_parser.rb in ruco-0.2.0.beta8 vs lib/ruco/syntax_parser.rb in ruco-0.2.0.beta9

- old
+ new

@@ -1,9 +1,9 @@ module Ruco module SyntaxParser - # uv only offers certain syntax - UV_CONVERT = { + # textpow only offers certain syntax + TEXTPOW_CONVERT = { 'scss' => 'sass', 'html+erb' => 'html_rails', } def self.syntax_for_lines(lines, languages) @@ -17,13 +17,13 @@ def self.syntax_node(languages) @@syntax_node ||= {} @@syntax_node[languages] ||= begin found = nil - fallbacks = languages.map{|l| UV_CONVERT[l] }.compact + fallbacks = languages.map{|l| TEXTPOW_CONVERT[l] }.compact (languages + fallbacks).detect do |language| - syntax = File.join(Uv.syntax_path, "#{language}.syntax") + syntax = File.join(Textpow.syntax_path, "#{language}.syntax") found = Textpow::SyntaxNode.load(syntax) if File.exist?(syntax) end found end