Merge pull request #2528 from andreynering/diff-sintax-highlight-733
Enable syntax highlighting on diff view
This commit is contained in:
commit
f15a2f9b25
10 changed files with 88 additions and 61 deletions
|
@ -76,13 +76,13 @@
|
|||
<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}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</pre>
|
||||
<pre><code class="wrap {{if $file.GetHighlightClass}}language-{{$file.GetHighlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></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}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</pre>
|
||||
<pre><code class="wrap {{if $file.GetHighlightClass}}language-{{$file.GetHighlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
@ -104,7 +104,7 @@
|
|||
</td>
|
||||
{{end}}
|
||||
<td class="lines-code">
|
||||
<pre>{{$section.GetComputedInlineDiffFor $line}}</pre>
|
||||
<pre><code class="{{if $file.GetHighlightClass}}language-{{$file.GetHighlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue