Skip to content

Commit

Permalink
Merge pull request #543 from mgreter/expose-quote-function
Browse files Browse the repository at this point in the history
Exports quote and unquote functions for C bindings
  • Loading branch information
HamptonMakes committed Oct 16, 2014
2 parents 48cbcfa + 8f1a7a8 commit f660ede
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sass_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "sass_interface.h"
#include "context.hpp"
#include "inspect.hpp"

#ifndef SASS_ERROR_HANDLING
#include "error_handling.hpp"
Expand Down Expand Up @@ -266,4 +267,12 @@ extern "C" {
return 1;
}

const char* quote (const char *str, const char quotemark) {
return Sass::quote(str, quotemark).c_str();
}

const char* unquote (const char *str) {
return Sass::unquote(str).c_str();
}

}
3 changes: 3 additions & 0 deletions sass_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ int sass_compile (struct sass_context* ctx);
int sass_compile_file (struct sass_file_context* ctx);
int sass_compile_folder (struct sass_folder_context* ctx);

const char* quote (const char *str, const char quotemark);
const char* unquote (const char *str);

#ifdef __cplusplus
}
#endif

0 comments on commit f660ede

Please sign in to comment.