aboutsummaryrefslogtreecommitdiffstats
path: root/templates/shared
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2022-10-15 21:24:41 +0300
committerGitHub <noreply@github.com>2022-10-16 02:24:41 +0800
commitb9cd6fb70370b97496e03c61be35e0d3ceedc52d (patch)
tree954ec4f87da6f2de8405f2395cc2283ea49b722e /templates/shared
parent671c609c465f02d7ac5023bb8491694a9f4768f5 (diff)
downloadgitea-b9cd6fb70370b97496e03c61be35e0d3ceedc52d.tar.gz
gitea-b9cd6fb70370b97496e03c61be35e0d3ceedc52d.zip
Add `code` highlighting in issue titles (#21432)
This changes the rendering logic of issue titles. If a substring in an issue title is enclosed with a pair of backticks, it'll be rendered with a monospace font (HTML `code` tag). * Closes #20887 Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/shared')
-rw-r--r--templates/shared/issuelist.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl
index 0e5879c612..066d34fe33 100644
--- a/templates/shared/issuelist.tmpl
+++ b/templates/shared/issuelist.tmpl
@@ -35,7 +35,7 @@
</div>
<div class="issue-item-main f1 fc df">
<div class="issue-item-top-row">
- <a class="title tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji .Title}}</a>
+ <a class="title tdn issue-title" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji .Title | RenderCodeBlock}}</a>
{{if .IsPull}}
{{if (index $.CommitStatuses .PullRequest.ID)}}
{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID) "root" $}}