nix-log2xml: Handle newlines

This commit is contained in:
Eelco Dolstra 2014-08-13 19:06:20 +02:00
parent cb921f67c3
commit fde819f2e2

View file

@ -137,6 +137,7 @@ void Decoder::finishLine()
if (line[i] == '<') cout << "&lt;";
else if (line[i] == '&') cout << "&amp;";
else if (line[i] == '\r') ; /* ignore carriage return */
else if (line[i] == '\n') cout << "\n";
else if (line[i] >= 0 && line[i] < 32 && line[i] != 9) cout << "&#xfffd;";
else if (i + sz + 33 < line.size() &&
string(line, i, sz) == storeDir &&