about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-13T17·06+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-13T17·06+0200
commitfde819f2e22e0fb84dc6d8fc4602a00577137d0a (patch)
tree1eb5b3eecb05b287f426a55d51c6368c9d3617db /src
parentcb921f67c3f87c0934f7969f24cd6deab70e8574 (diff)
nix-log2xml: Handle newlines
Diffstat (limited to 'src')
-rw-r--r--src/nix-log2xml/log2xml.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix-log2xml/log2xml.cc b/src/nix-log2xml/log2xml.cc
index e26fb0023641..31cea60c3809 100644
--- a/src/nix-log2xml/log2xml.cc
+++ b/src/nix-log2xml/log2xml.cc
@@ -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 &&