commit
2cf8010792
6 changed files with 38 additions and 29 deletions
|
@ -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
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
.readme
|
||||
- if content.name =~ /\.(md|markdown)$/i
|
||||
= preserve do
|
||||
= markdown(content.data.detect_encoding!)
|
||||
= markdown(content.data)
|
||||
- else
|
||||
= simple_format(content.data.detect_encoding!)
|
||||
= simple_format(content.data)
|
||||
|
||||
- if params[:path]
|
||||
- history_path = tree_file_project_ref_path(@project, @ref, params[:path])
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#tree-readme-holder
|
||||
.readme
|
||||
= preserve do
|
||||
= markdown(file.data.detect_encoding!)
|
||||
= markdown(file.data)
|
||||
- else
|
||||
.view_file_content
|
||||
- unless file.empty?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue