Center lines for asciimoji+text

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-19 11:04:52 +02:00
parent 0cfba17d3d
commit b5e2721aa1
10 changed files with 41 additions and 16 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import (
"github.com/anotherhadi/spilltea/internal/db"
"github.com/anotherhadi/spilltea/internal/keys"
"github.com/anotherhadi/spilltea/internal/style"
"github.com/anotherhadi/spilltea/internal/util"
)
type Model struct {
@@ -116,7 +117,7 @@ func (m *Model) refreshBody() {
func renderMarkdown(src string, width int) string {
if src == "" {
return style.S.Faint.Render(" (ㆆ _ ㆆ)\nno description")
return style.S.Faint.Render(util.CenterLines("(ㆆ _ ㆆ)", "no description"))
}
tmpl, err := template.New("").Parse(src)
if err != nil {