diff --git a/public/css/index.css b/public/css/index.css index 0d6112a16..35e56413b 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -1435,7 +1435,7 @@ footer .ui.language .menu { .repository.file.list #file-content .code-view .lines-code ol li, .repository.file.list #file-content .code-view .lines-num .hljs li, .repository.file.list #file-content .code-view .lines-code .hljs li { - display: inline-block; + display: block; width: 100%; } .repository.file.list #file-content .code-view .lines-num pre li.active, diff --git a/public/less/_repository.less b/public/less/_repository.less index 56249f3a9..c6f452763 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -296,7 +296,7 @@ margin: 0; padding: 0 !important; li { - display: inline-block; + display: block; width: 100%; &.active { background: #ffffdd; diff --git a/routers/repo/view.go b/routers/repo/view.go index a3c42a0fd..84e5ba85c 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -212,7 +212,11 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st var output bytes.Buffer lines := strings.Split(fileContent, "\n") for index, line := range lines { - output.WriteString(fmt.Sprintf(`