Closed
Description
I'm trying to upgrade to 3.2.0-beta.4
following the notes in #1000.
The old way:
struct Sass_Import** sass_importer(const char* url, const char* prev, void* cookie) {
return do_something_fun_with(url, prev);
}
The new way:
struct Sass_Import** sass_importer(const char* cur_path, Sass_Importer_Entry cb, struct Sass_Compiler* comp) {
struct Sass_Import* previous = sass_compiler_get_last_import(comp);
const char* prev_path = sass_import_get_path(previous);
return do_something_fun_with(cur_path, prev_path);
}
The problem here is that prev_path
always is an empty string (and sass_import_get_base(previous)
is nullptr). I'm running a with Sass_Data_Context
if that makes any difference. Having the sass_importer
return NULL
will load the proper file. What am I missing?