@@ -74,14 +74,14 @@ namespace Sass {
7474 // move line_beg pointer to line start
7575 while (line_beg && *line_beg && lines != 0 ) {
7676 if (*line_beg == ' \n ' ) --lines;
77- utf8::unchecked::next (line_beg);
77+ utf8::unchecked::next (line_beg);
7878 }
7979 const char * line_end = line_beg;
8080 // move line_end before next newline character
8181 while (line_end && *line_end && *line_end != ' \n ' ) {
8282 if (*line_end == ' \n ' ) break ;
8383 if (*line_end == ' \r ' ) break ;
84- utf8::unchecked::next (line_end);
84+ utf8::unchecked::next (line_end);
8585 }
8686 if (line_end && *line_end != 0 ) ++ line_end;
8787 size_t line_len = line_end - line_beg;
@@ -524,6 +524,7 @@ extern "C" {
524524 options->c_headers = 0 ;
525525 options->plugin_paths = 0 ;
526526 options->include_paths = 0 ;
527+ options->extensions = 0 ;
527528 }
528529
529530 // helper function, not exported, only accessible locally
@@ -558,6 +559,18 @@ extern "C" {
558559 cur = next;
559560 }
560561 }
562+ // Deallocate extension
563+ if (options->extensions ) {
564+ struct string_list * cur;
565+ struct string_list * next;
566+ cur = options->extensions ;
567+ while (cur) {
568+ next = cur->next ;
569+ free (cur->string );
570+ free (cur);
571+ cur = next;
572+ }
573+ }
561574 // Free options strings
562575 free (options->input_path );
563576 free (options->output_path );
@@ -577,6 +590,7 @@ extern "C" {
577590 options->c_headers = 0 ;
578591 options->plugin_paths = 0 ;
579592 options->include_paths = 0 ;
593+ options->extensions = 0 ;
580594 }
581595
582596 // helper function, not exported, only accessible locally
@@ -713,6 +727,22 @@ extern "C" {
713727 IMPLEMENT_SASS_CONTEXT_TAKER (char *, source_map_string);
714728 IMPLEMENT_SASS_CONTEXT_TAKER (char **, included_files);
715729
730+ // Push function for import extenions
731+ void ADDCALL sass_option_push_import_extension (struct Sass_Options * options, const char * ext)
732+ {
733+ struct string_list * extension = (struct string_list *) calloc (1 , sizeof (struct string_list ));
734+ if (extension == 0 ) return ;
735+ extension->string = ext ? sass_copy_c_string (ext) : 0 ;
736+ struct string_list * last = options->extensions ;
737+ if (!options->extensions ) {
738+ options->extensions = extension;
739+ } else {
740+ while (last->next )
741+ last = last->next ;
742+ last->next = extension;
743+ }
744+ }
745+
716746 // Push function for include paths (no manipulation support for now)
717747 void ADDCALL sass_option_push_include_path (struct Sass_Options * options, const char * path)
718748 {
0 commit comments