Correctly set the syntax of extension templates when converting them to the users preferred syntax.

This commit is contained in:
Eric Meyer 2010-04-12 19:25:35 -06:00
parent 038a88b59b
commit 84992100ea

View File

@ -85,7 +85,7 @@ module Compass
contents = File.new(from).read
if preferred_syntax.to_s != from[-4..-1]
logger.record :convert, basename(from)
tree = Sass::Engine.new(contents, Compass.sass_engine_options).to_tree
tree = Sass::Engine.new(contents, Compass.sass_engine_options.merge(:syntax => from[-4..-1].intern)).to_tree
contents = tree.send("to_#{preferred_syntax}")
to[-4..-1] = preferred_syntax.to_s
end