[gitg/wip/techlivezh/bug/720886: 1/7] Remove unnecessary 'tabrepl' var
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/bug/720886: 1/7] Remove unnecessary 'tabrepl' var
- Date: Mon, 13 Jan 2014 10:33:29 +0000 (UTC)
commit a09dd86e2a68669ebb8989dd4fd1bb2825ffa2ee
Author: Techlive Zheng <techlivezheng gmail com>
Date: Thu Dec 19 09:35:32 2013 +0800
Remove unnecessary 'tabrepl' var
'tabrepl' is used only once, no need for a dedicated variable.
libgitg/resources/diff-view-html-builder.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index 3698326..228d32b 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -5,8 +5,6 @@ function html_escape(s)
function diff_file(file, lnstate, data)
{
- tabrepl = '<span class="tab" style="width: ' + data.settings.tab_width + 'ex">\t</span>';
-
var added = 0;
var removed = 0;
@@ -75,7 +73,9 @@ function diff_file(file, lnstate, data)
break;
}
- row += '<td class="code">' + html_escape(l.content).replace(/\t/g, tabrepl) + '</td>';
+ l.content = html_escape(l.content).replace(/\t/g, '<span class="tab" style="width: '
+ data.settings.tab_width + 'ex">\t</span>');
+
+ row += '<td class="code">' + l.content + '</td>';
row += '</tr>';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]