From a2683e5ddb65c4fb4455872cbf377b59dba14f86 Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Thu, 30 Apr 2020 04:10:15 -0400 Subject: Allow emoji short code in labels (#11250) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allow emoji short code in labels As title, turn :alias: type short code into emojis when rendering labels to match previous behavior * Update models/issue_label.go Co-Authored-By: John Olheiser * render text in templates not code * remove has-emoji class 🧙‍♀️ * fix new issue form Co-authored-by: John Olheiser Co-authored-by: Lunny Xiao --- templates/repo/issue/view_content/sidebar.tmpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'templates/repo/issue/view_content/sidebar.tmpl') diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 941141b55f..2c355a9c00 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -111,13 +111,13 @@
{{.i18n.Tr "repo.issues.new.clear_labels"}}
{{if or .Labels .OrgLabels}} {{range .Labels}} - {{svg "octicon-check" 16}} {{.Name}} - {{if .Description }}
{{.Description}}{{end}}
+ {{svg "octicon-check" 16}} {{.Name | RenderEmojiPlain}} + {{if .Description }}
{{.Description | RenderEmojiPlain}}{{end}}
{{end}}
{{range .OrgLabels}} - {{svg "octicon-check" 16}} {{.Name}} - {{if .Description }}
{{.Description}}{{end}}
+ {{svg "octicon-check" 16}} {{.Name | RenderEmojiPlain}} + {{if .Description }}
{{.Description | RenderEmojiPlain}}{{end}}
{{end}} {{else}}
{{.i18n.Tr "repo.issues.new.no_items"}}
@@ -128,12 +128,12 @@ {{.i18n.Tr "repo.issues.new.no_label"}} {{range .Labels}} {{end}} {{range .OrgLabels}} {{end}} -- cgit v1.2.3