@@ -13,24 +13,24 @@ module.exports = function (source, noComments) {
1313 if (!insidePre) {
1414 var start = line.match(/<pre/);
1515 if (start) {
16- line.replace(/^\s+/, ""); // only before the pre tag
16+ line = line.replace(/^\s+/, ""); // only before the pre tag
1717
1818 // does it end in the same line?
1919 var end = line.match(/<\/pre>/);
2020 if (end && end.index > start.index)
21- line.replace(/\s+$/, "");
21+ line = line.replace(/\s+$/, "");
2222 else
2323 insidePre = true;
2424 }
2525 else { // no pre
26- line.trim();
27- line.replace(/\s\s+/, ""); // condense spaces
26+ line = line.replace(/\s+/g, " "); // condense spaces
27+ line = line.trim();
2828 }
2929 }
3030 else { // inside pre tag
3131 var end = line.match(/<\/pre>/);
3232 if (end) {
33- line.replace(/\s+$/, "");
33+ line = line.replace(/\s+$/, "");
3434 insidePre = false;
3535 }
3636 }