Apply 'pre-wrap' only on code

Now, we can indent the html elements in normal '<td>'.

https://bugzilla.gnome.org/show_bug.cgi?id=720886
This commit is contained in:
Techlive Zheng 2013-12-18 07:08:57 +08:00
parent 64c30d5f19
commit 1ce3808ad0
3 changed files with 7 additions and 4 deletions

View file

@ -91,7 +91,7 @@ function diff_file(file, lnstate, data)
break;
}
row += '<td>' + html_escape(l.content).replace(/\t/g, tabrepl) + '</td>';
row += '<td class="code">' + html_escape(l.content).replace(/\t/g, tabrepl) + '</td>';
row += '</tr>';

View file

@ -57,7 +57,7 @@ div#diff div.file table .gutter {
text-align: right;
}
div#diff div.file table td {
div#diff div.file table td.code {
white-space: pre;
}
@ -66,7 +66,7 @@ span.tab {
display: inline-block;
}
div#diff div.file table.wrapped td {
div#diff div.file table.wrapped td.code {
white-space: pre-wrap;
}

View file

@ -29,7 +29,10 @@
</colgroup>
<tbody>
<tr class="file_header">
<td colspan="3"><!-- ${FILE_STATS} --><span class="file_path"><!-- ${FILE_PATH} --></span></td>
<td colspan="3">
<!-- ${FILE_STATS} -->
<span class="file_path"><!-- ${FILE_PATH} --></span>
</td>
</tr>
<!-- ${FILE_BODY} -->
</tbody>