mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
fix titleize()
This commit is contained in:
@@ -328,7 +328,7 @@ func render(w http.ResponseWriter, r *http.Request) {
|
|||||||
"event": event,
|
"event": event,
|
||||||
"eventJSON": string(eventJSON),
|
"eventJSON": string(eventJSON),
|
||||||
"content": content,
|
"content": content,
|
||||||
"titleizedContent": titleize(content),
|
"titleizedContent": titleize(event.Content),
|
||||||
"textImageURL": textImageURL,
|
"textImageURL": textImageURL,
|
||||||
"videoType": videoType,
|
"videoType": videoType,
|
||||||
"image": image,
|
"image": image,
|
||||||
|
|||||||
2
utils.go
2
utils.go
@@ -362,7 +362,7 @@ func titleize(s string) string {
|
|||||||
if len(s) <= 65 {
|
if len(s) <= 65 {
|
||||||
return "\"" + s + "\""
|
return "\"" + s + "\""
|
||||||
}
|
}
|
||||||
return "\"" + s[:65] + "...\""
|
return "\"" + s[:64] + "…\""
|
||||||
}
|
}
|
||||||
|
|
||||||
func unique(strSlice []string) []string {
|
func unique(strSlice []string) []string {
|
||||||
|
|||||||
Reference in New Issue
Block a user