Skip to content

Commit

Permalink
Merge pull request #104 from algorandfoundation/chore/use-autostyle-f…
Browse files Browse the repository at this point in the history
…or-bootstrap-questions

chore: use autostyle for bootstrap questions
  • Loading branch information
PhearZero authored Jan 16, 2025
2 parents 51d9449 + 6042341 commit 2b03652
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 2b03652

Please sign in to comment.