OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
202807c
)
diff now no need to force_encoding to utf8
author
Saito
<saitowu@gmail.com>
Wed, 30 May 2012 03:56:48 +0000
(11:56 +0800)
committer
Saito
<saitowu@gmail.com>
Wed, 30 May 2012 03:56:48 +0000
(11:56 +0800)
app/helpers/commits_helper.rb
patch
|
blob
|
history
diff --git
a/app/helpers/commits_helper.rb
b/app/helpers/commits_helper.rb
index
cf1395f
..
63f38ee
100644
(file)
--- a/
app/helpers/commits_helper.rb
+++ b/
app/helpers/commits_helper.rb
@@
-58,14
+58,14
@@
module CommitsHelper
next if line.match(/^\-\-\- a/)
next if line.match(/^\+\+\+ b/)
- full_line = html_escape(line.gsub(/\n/, ''))
.force_encoding("UTF-8")
+ full_line = html_escape(line.gsub(/\n/, ''))
if line.match(/^@@ -/)
type = "match"
line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0
line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0
-
+
next if line_old == 1 && line_new == 1
yield(full_line, type, nil, nil, nil)
next