mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
fix: broken markdown by replace \n into <md>
This commit is contained in:
committed by
Stefan Haller
parent
bc4b50f817
commit
b11da414c5
@ -221,9 +221,12 @@ func formatBinding(binding *types.Binding) string {
|
||||
action += fmt.Sprintf(" (%s)", binding.Alternative)
|
||||
}
|
||||
|
||||
// Replace newlines with <br> tags for proper markdown table formatting
|
||||
tooltip := strings.ReplaceAll(binding.Tooltip, "\n", "<br>")
|
||||
|
||||
// Use backticks for keyboard keys. Two backticks are needed with an inner space
|
||||
// to escape a key that is itself a backtick.
|
||||
return fmt.Sprintf("| `` %s `` | %s | %s |\n", action, description, binding.Tooltip)
|
||||
return fmt.Sprintf("| `` %s `` | %s | %s |\n", action, description, tooltip)
|
||||
}
|
||||
|
||||
func italicize(str string) string {
|
||||
|
Reference in New Issue
Block a user