summaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-12-30 00:48:28 +0100
committerGitHub <noreply@github.com>2020-12-29 18:48:28 -0500
commit8e5aea88c7095014741f753d5eca14f8f3b6fe2f (patch)
tree58d62d4b27ea7c28617f6511c1f77907f00ee7fb /modules/templates/helper.go
parentcfc3916b3f99f38620136a93e339b935ae66a16f (diff)
downloadgitea-8e5aea88c7095014741f753d5eca14f8f3b6fe2f.tar.gz
gitea-8e5aea88c7095014741f753d5eca14f8f3b6fe2f.zip
Improve label and text wrapping (#14113)
* Improve label wrapping - Adjust issue list styles so labels can wrap on the same line as the text. This relies on `display: inline` with the HTML whitespace being used as the separator. - Add global word-break: break-word. This should generally avoid text overflows in various places. * add whitespace to history labels * use overflow-wrap * restore word-break rules * use correct pre * use better selector for middle align Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 97d3029839..4e767ad44d 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -371,7 +371,7 @@ func NewFuncMap() []template.FuncMap {
"RenderLabels": func(labels []*models.Label) template.HTML {
html := `<span class="labels-list">`
for _, label := range labels {
- html += fmt.Sprintf("<div class='ui label' style='color: %s; background-color: %s'>%s</div>",
+ html += fmt.Sprintf("<div class='ui label' style='color: %s; background-color: %s'>%s</div> ",
label.ForegroundColor(), label.Color, RenderEmoji(label.Name))
}
html += "</span>"