summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-01-09 13:39:18 +0800
committerUnknwon <u@gogs.io>2016-01-09 13:39:18 +0800
commitbcf6aed45237250f678e7051a5ee0bc7c6e2f3c3 (patch)
tree76fec917b2379b8455d67b92b16fa8d3424d082d /templates
parent4331d1d2a00896b6bc5452abd93066110156d414 (diff)
parent697b0e2aba454325d5b70736823440e1db2c40ba (diff)
downloadgitea-bcf6aed45237250f678e7051a5ee0bc7c6e2f3c3.tar.gz
gitea-bcf6aed45237250f678e7051a5ee0bc7c6e2f3c3.zip
Merge pull request #2335 from andreynering/highlight-diff
Highlight diff
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff_box.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl
index 3093210b48..da512ebf0b 100644
--- a/templates/repo/diff_box.tmpl
+++ b/templates/repo/diff_box.tmpl
@@ -26,7 +26,7 @@
{{end}}
</div>
<!-- todo finish all file status, now modify, add, delete and rename -->
- <span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center">&nbsp;</span>
+ <span class="status {{DiffTypeToStr .GetType}} poping up" data-content="{{DiffTypeToStr .GetType}}" data-variation="inverted tiny" data-position="right center">&nbsp;</span>
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
</li>
{{end}}
@@ -71,18 +71,18 @@
{{if $.IsSplitStyle}}
{{range $j, $section := .Sections}}
{{range $k, $line := .Lines}}
- <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
+ <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
<td class="lines-num lines-num-old">
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-code halfwidth">
- <pre class="wrap">{{if $line.LeftIdx}}{{$line.Content}}{{end}}</pre>
+ <pre class="wrap">{{if $line.LeftIdx}}{{$line.ParsedContent}}{{end}}</pre>
</td>
<td class="lines-num lines-num-new">
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
</td>
<td class="lines-code halfwidth">
- <pre class="wrap">{{if $line.RightIdx}}{{$line.Content}}{{end}}</pre>
+ <pre class="wrap">{{if $line.RightIdx}}{{$line.ParsedContent}}{{end}}</pre>
</td>
</tr>
{{end}}
@@ -90,8 +90,8 @@
{{else}}
{{range $j, $section := .Sections}}
{{range $k, $line := .Lines}}
- <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
- {{if eq .Type 4}}
+ <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
+ {{if eq .GetType 4}}
<td colspan="2" class="lines-num">
{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}}
</td>
@@ -104,7 +104,7 @@
</td>
{{end}}
<td class="lines-code">
- <pre>{{$line.Content}}</pre>
+ <pre>{{$line.ParsedContent}}</pre>
</td>
</tr>
{{end}}