Skip to content

Commit

Permalink
Fix for source-map issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Dec 22, 2014
1 parent 86f56b2 commit 492c870
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 0 additions & 2 deletions inspect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,6 @@ namespace Sass {
void Inspect::append_to_buffer(const string& text)
{
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}

}
8 changes: 6 additions & 2 deletions output_compressed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ namespace Sass {
seen_utf8 = true;
}
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}

void Output_Compressed::operator()(Import* imp)
Expand Down Expand Up @@ -224,6 +226,8 @@ namespace Sass {
seen_utf8 = true;
}
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}
}

Expand Down Expand Up @@ -382,6 +386,8 @@ namespace Sass {
void Output_Compressed::append_singleline_part_to_buffer(const string& text)
{
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
for(const char& chr : text) {
// abort clause
if (seen_utf8) break;
Expand All @@ -390,8 +396,6 @@ namespace Sass {
// singleton
seen_utf8 = true;
}
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}

}
6 changes: 4 additions & 2 deletions output_nested.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace Sass {
seen_utf8 = true;
}
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}

void Output_Nested::operator()(Import* imp)
Expand Down Expand Up @@ -347,6 +349,8 @@ namespace Sass {
void Output_Nested::append_to_buffer(const string& text)
{
buffer += text;
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
for(const char& chr : text) {
// abort clause
if (seen_utf8) break;
Expand All @@ -355,8 +359,6 @@ namespace Sass {
// singleton
seen_utf8 = true;
}
if (ctx && !ctx->_skip_source_map_update)
ctx->source_map.update_column(text);
}

}

0 comments on commit 492c870

Please sign in to comment.