summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2019-02-15 08:23:20 +0100
committertechknowlogick <matti@mdranta.net>2019-02-15 02:23:20 -0500
commitec540294a16353817fbd85d8cddc875722ac778a (patch)
treec97d1c61dfa7b21089c8cdb5a38fdcb1c8cbcf0f /templates/repo/diff
parent7ae59567a2ec3065b10b75aff545edb06aac4790 (diff)
downloadgitea-ec540294a16353817fbd85d8cddc875722ac778a.tar.gz
gitea-ec540294a16353817fbd85d8cddc875722ac778a.zip
Revert "Fix wrapping long code lines in UI" (#6074)
This reverts commit e5cd80e0219f10818f43e8cab6b9c814cb1cd796. Fixes: https://github.com/go-gitea/gitea/issues/6064
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/box.tmpl4
-rw-r--r--templates/repo/diff/section_unified.tmpl2
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 5f04db409b..331a17a5e9 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -127,7 +127,7 @@
{{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 2))}}
<a class="ui green button add-code-comment add-code-comment-left" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}">+</a>
{{end}}
- <pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
+ <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{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>
@@ -137,7 +137,7 @@
{{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 3))}}
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
{{end}}
- <pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
+ <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
</td>
</tr>
{{if gt (len $line.Comments) 0}}
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl
index 1c6f59fb09..53ccaedbc2 100644
--- a/templates/repo/diff/section_unified.tmpl
+++ b/templates/repo/diff/section_unified.tmpl
@@ -19,7 +19,7 @@
{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}
<a class="ui green button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">+</a>
{{end}}
- <pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
+ <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
</td>
</tr>
{{if gt (len $line.Comments) 0}}