[gitg/wip/techlivezh/diff-view-clean-up: 2/12] Apply 'pre-wrap' only on code
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/diff-view-clean-up: 2/12] Apply 'pre-wrap' only on code
- Date: Sat, 21 Dec 2013 16:20:49 +0000 (UTC)
commit 4762e1354bd0fd718ed38d56e99d506c79da0624
Author: Techlive Zheng <techlivezheng gmail com>
Date: Wed Dec 18 07:04:23 2013 +0800
Apply 'pre-wrap' only on code
libgitg/resources/diff-view-html-builder.js | 2 +-
libgitg/resources/diff-view.css | 4 ++--
libgitg/resources/diff-view.html | 5 ++++-
3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index d8c663a..3a81456 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -98,7 +98,7 @@ function diff_file(file, lnstate, data)
l.content = html_escape(l.content).replace(/\t/g, '<span class="tab" style="width: '
+ data.settings.tab_width + 'ex">\t</span>');
- row += '<td>' + l.content + '</td>';
+ row += '<td class="code">' + l.content + '</td>';
row += '</tr>';
diff --git a/libgitg/resources/diff-view.css b/libgitg/resources/diff-view.css
index b0c0b04..91d6f0d 100644
--- a/libgitg/resources/diff-view.css
+++ b/libgitg/resources/diff-view.css
@@ -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;
}
diff --git a/libgitg/resources/diff-view.html b/libgitg/resources/diff-view.html
index a4f4401..bdba70a 100644
--- a/libgitg/resources/diff-view.html
+++ b/libgitg/resources/diff-view.html
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]