Skip to content

Commit 33f4856

Browse files
committed
Merge pull request #1316 from xzyfer/fix/1230
Fix string output normalization for linefeeds
2 parents 54707e1 + dda1181 commit 33f4856

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

util.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,14 @@ namespace Sass {
216216
string string_to_output(const string& str)
217217
{
218218
string out("");
219+
bool lf = false;
219220
for (auto i : str) {
220221
if (i == 10) {
221222
out += ' ';
222-
} else {
223+
lf = true;
224+
} else if (!(lf && isspace(i))) {
223225
out += i;
226+
lf = false;
224227
}
225228
}
226229
return out;

0 commit comments

Comments
 (0)