[gnome-code-assistance] css: fix css backend for scss api changes.



commit e0159070894614be30805ff9af72d4a2874a2e44
Author: Christian Hergert <christian hergert me>
Date:   Mon Jan 5 14:20:27 2015 -0800

    css: fix css backend for scss api changes.
    
    We need to specify an importer for the parser classes now. I suspect
    this changed upstream at somepoint and nobody knew about it.
    
    Trivial fix, however we might consider using a project path to determine
    where the top of the CSS imports should be.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742421

 backends/css/app.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/backends/css/app.rb b/backends/css/app.rb
index 5cf64f2..021cc79 100644
--- a/backends/css/app.rb
+++ b/backends/css/app.rb
@@ -62,6 +62,7 @@ module Gnome::CodeAssistance
                 doc.diagnostics = []
 
                 f = File.new(doc.data_path, 'r')
+                importer = Sass::Importers::Filesystem.new(File.dirname(doc.path))
 
                 if doc.path.end_with?('.css')
                     cls = CssParser
@@ -70,7 +71,7 @@ module Gnome::CodeAssistance
                 end
 
                 begin
-                    parser = cls.new(f.read(), doc.path)
+                    parser = cls.new(f.read(), doc.path, importer)
                     parser.parse()
                 rescue Sass::SyntaxError => e
                     doc.diagnostics = [make_diagnostic(e)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]