Skip to content

Commit

Permalink
chore: use auto-style for bootstrap questions
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Jan 16, 2025
1 parent 51d9449 commit 6042341
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui/bootstrap/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ func (m Model) View() string {
case CatchupQuestion:
str = CatchupQuestionMsg
}
msg, _ := glamour.Render(str, "dark")
var msg string
r, err := glamour.NewTermRenderer(glamour.WithAutoStyle())
if err != nil {
// Fallback to dark mode
msg, _ = glamour.Render(str, "dark")
} else {
msg, _ = r.Render(str)
}
return msg
}

0 comments on commit 6042341

Please sign in to comment.