Skip to content

Exports quote and unquote functions for C bindings #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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