Skip to content

Commit

Permalink
Merge branch 'jlinton-JL_CHANGES't push origin master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hampton Catlin committed Oct 12, 2014
2 parents 0576bc5 + f44b8ca commit 3cd63a0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ namespace Sass {
{
Block* root = 0;
for (size_t i = 0; i < queue.size(); ++i) {
Parser p(Parser::from_c_str(queue[i].second, *this, queue[i].first, Position(1 + i, 1, 1)));
string parsedata=string(source_c_str)+string("\n")+string(queue[i].second);
Parser p(Parser::from_c_str(parsedata.c_str(), *this, queue[i].first, Position(1 + i, 0, 1)));
Block* ast = p.parse();
if (i == 0) root = ast;
style_sheets[queue[i].first] = ast;
Expand Down
8 changes: 7 additions & 1 deletion sass_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,14 @@ extern "C" {
else {
output_path = c_ctx->output_path;
}
if (c_ctx->source_string==NULL)
{
c_ctx->source_string="//";
}
Context cpp_ctx(
Context::Data().entry_point(input_path)

Context::Data().source_c_str(c_ctx->source_string)
.entry_point(input_path)
.output_path(output_path)
.output_style((Output_Style) c_ctx->options.output_style)
.source_comments(c_ctx->options.source_comments)
Expand Down
4 changes: 4 additions & 0 deletions sass_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ struct sass_context {
};

struct sass_file_context {
// Input Path is the path to the Sass file for processing
const char* input_path;
const char* output_path;
// Source string is an optional way to inject some Sass before the file is executed
// to allow for dynamic changes in execution w/o a file change.
const char* source_string;
char* output_string;
char* source_map_string;
struct sass_options options;
Expand Down

0 comments on commit 3cd63a0

Please sign in to comment.