aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-04-06 20:07:08 +0800
committerGitHub <noreply@github.com>2024-04-06 20:07:08 +0800
commit7396172a02a9ea8d80f9763469fd65a5a12ff3f7 (patch)
tree542c878fb484a660504d8588c2bcff6cd1c3ff2a /templates/base
parent9c1f4dae2ee85b748250ba7b161d70bd529088d3 (diff)
downloadgitea-7396172a02a9ea8d80f9763469fd65a5a12ff3f7.tar.gz
gitea-7396172a02a9ea8d80f9763469fd65a5a12ff3f7.zip
Fix code block style for code preview (#30298)
Fix #30292 To avoid unnecessary style overriding, use "div" instead of "code"
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/markup_codepreview.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/base/markup_codepreview.tmpl b/templates/base/markup_codepreview.tmpl
index c65ab28406..a1a4f26b47 100644
--- a/templates/base/markup_codepreview.tmpl
+++ b/templates/base/markup_codepreview.tmpl
@@ -17,7 +17,7 @@
{{- $lineEscapeStatus := index $.LineEscapeStatus $idx -}}
<td class="lines-escape">{{if $lineEscapeStatus.Escaped}}<a href="#" class="toggle-escape-button btn interact-bg" title="{{if $lineEscapeStatus.HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{if $lineEscapeStatus.HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}"></a>{{end}}</td>
{{- end}}
- <td class="lines-code chroma"><code class="code-inner">{{$line.FormattedContent}}</code></td>
+ <td class="lines-code chroma"><div class="code-inner">{{$line.FormattedContent}}</div></td>{{/* only div works, span generates incorrect HTML structure */}}
</tr>
{{- end -}}
</tbody>