Skip to content

Commit 91a1bad

Browse files
committed
Merge pull request #28 from Coridyn/absolute-parent-path
Pass absolute parent_path to importer
2 parents c6d5941 + 69222c9 commit 91a1bad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/sassc/import_handler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def setup(native_options)
2424
def import_function
2525
@import_function ||= FFI::Function.new(:pointer, [:string, :pointer, :pointer]) do |path, importer_entry, compiler|
2626
last_import = Native::compiler_get_last_import(compiler)
27-
parent_path = Native::import_get_imp_path(last_import)
27+
parent_path = Native::import_get_abs_path(last_import)
2828

2929
imports = [*@importer.imports(path, parent_path)]
3030
imports_to_native(imports)

lib/sassc/native/native_functions_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def self.string_get_type(native_value)
103103
# ADDAPI const char* ADDCALL sass_import_get_imp_path (struct Sass_Import*);
104104
attach_function :sass_import_get_imp_path, [:sass_import_ptr], :string
105105
# ADDAPI const char* ADDCALL sass_import_get_abs_path (struct Sass_Import*);
106+
attach_function :sass_import_get_abs_path, [:sass_import_ptr], :string
106107
# ADDAPI const char* ADDCALL sass_import_get_source (struct Sass_Import*);
107108
attach_function :sass_import_get_source, [:sass_import_ptr], :string
108109
# ADDAPI const char* ADDCALL sass_import_get_srcmap (struct Sass_Import*);

0 commit comments

Comments
 (0)