Skip to content

Commit

Permalink
Merge pull request #1713 from xzyfer/fix/context
Browse files Browse the repository at this point in the history
Fix regressions in context refactor
  • Loading branch information
xzyfer committed Nov 11, 2015
2 parents 49077ea + 949fc98 commit f47645c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ namespace Sass {

// do not parse same resource twice
// maybe raise an error in this case
if (sheets.count(inc.abs_path)) {
free(res.contents); free(res.srcmap);
throw std::runtime_error("duplicate resource registered");
return;
}
// if (sheets.count(inc.abs_path)) {
// free(res.contents); free(res.srcmap);
// throw std::runtime_error("duplicate resource registered");
// return;
// }

// get index for this resource
size_t idx = resources.size();
Expand All @@ -276,7 +276,7 @@ namespace Sass {
resources.push_back(res);

// add a relative link to the working directory
included_files.push_back(abs2rel(inc.abs_path, CWD));
included_files.push_back(inc.abs_path);
// add a relative link to the source map output file
srcmap_links.push_back(abs2rel(inc.abs_path, source_map_file, CWD));

Expand Down
3 changes: 1 addition & 2 deletions src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ namespace Sass {
if (ctx && ctx->c_options->source_comments) {
std::stringstream ss;
append_indentation();
std::string path = Sass::File::abs2rel(r->pstate().path, ctx->cwd());
ss << "/* line " << r->pstate().line + 1 << ", " << path << " */";
ss << "/* line " << r->pstate().line + 1 << ", " << r->pstate().path << " */";
append_string(ss.str());
append_optional_linefeed();
}
Expand Down

0 comments on commit f47645c

Please sign in to comment.