0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-22 02:34:43 +01:00

Add wrapping to long diff lines (#2789)

* Add wrapping to long diff lines to fix #1827

* Fix  css class and make changes to source (less) files

* Fix wrong space indentation

* Fix indentation inconsistencies and remove very old WebKit workaround
This commit is contained in:
Lauris BH 2017-10-27 07:30:54 +03:00 committed by Lunny Xiao
parent ddb7f59ef4
commit 762f1d7237
4 changed files with 1754 additions and 1750 deletions

File diff suppressed because one or more lines are too long

View file

@ -26,7 +26,13 @@ pre, code {
// white-space: -moz-normal; /* Mozilla, since 1999 */
// white-space: -normal; /* Opera 4-6 */
// white-space: -o-normal; /* Opera 7 */
word-break: break-word;
-ms-word-break: break-all;
word-break: break-all;
/* These are technically the same, but use both */
overflow-wrap: break-word;
word-wrap: break-word;
}
}
.dont-break-out {
@ -35,10 +41,7 @@ pre, code {
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */
word-break: break-all;
/* Instead use this non-standard one: */
word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */
-ms-hyphens: auto;

View file

@ -939,6 +939,7 @@
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
vertical-align: top;
span.fold {
display: block;

View file

@ -16,7 +16,7 @@
</td>
{{end}}
<td class="lines-code">
<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>
{{end}}