Skip to content

Commit f660ede

Browse files
committed
Merge pull request #543 from mgreter/expose-quote-function
Exports quote and unquote functions for C bindings
2 parents 48cbcfa + 8f1a7a8 commit f660ede

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sass_interface.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "sass_interface.h"
88
#include "context.hpp"
9+
#include "inspect.hpp"
910

1011
#ifndef SASS_ERROR_HANDLING
1112
#include "error_handling.hpp"
@@ -266,4 +267,12 @@ extern "C" {
266267
return 1;
267268
}
268269

270+
const char* quote (const char *str, const char quotemark) {
271+
return Sass::quote(str, quotemark).c_str();
272+
}
273+
274+
const char* unquote (const char *str) {
275+
return Sass::unquote(str).c_str();
276+
}
277+
269278
}

sass_interface.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ int sass_compile (struct sass_context* ctx);
8888
int sass_compile_file (struct sass_file_context* ctx);
8989
int sass_compile_folder (struct sass_folder_context* ctx);
9090

91+
const char* quote (const char *str, const char quotemark);
92+
const char* unquote (const char *str);
93+
9194
#ifdef __cplusplus
9295
}
9396
#endif

0 commit comments

Comments
 (0)