Browse Source

templates/repo/diff: fix tag-code doesn't display in split view

pull/3854/merge
Unknwon 8 years ago
parent
commit
48cf9edcf5
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 7
      templates/repo/diff/box.tmpl
  2. 2
      templates/repo/diff/section_unified.tmpl

7
templates/repo/diff/box.tmpl

@ -93,6 +93,12 @@
{{range $j, $section := $file.Sections}}
{{range $k, $line := $section.Lines}}
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
{{if eq .GetType 4}}
<td class="lines-num"></td>
<td colspan="3" class="lines-code">
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
</td>
{{else}}
<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>
@ -105,6 +111,7 @@
<td class="lines-code halfwidth">
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
</td>
{{end}}
</tr>
{{end}}
{{end}}

2
templates/repo/diff/section_unified.tmpl

@ -19,7 +19,7 @@
{{end}}
</td>
{{end}}
<td class="lines-code" rel="">
<td class="lines-code">
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
</td>
</tr>

Loading…
Cancel
Save