Skip to content

Commit d0c4b65

Browse files
committed
fix: unnecessary ReplaceAll
1 parent 31c3385 commit d0c4b65

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/cheatsheet/generate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ func formatBinding(binding *types.Binding) string {
222222
}
223223

224224
// Replace newlines with <br> tags for proper markdown table formatting
225-
tooltip := strings.ReplaceAll(binding.Tooltip, "\n\n", "<br><br>")
226-
tooltip = strings.ReplaceAll(tooltip, "\n", "<br>")
225+
tooltip := strings.ReplaceAll(binding.Tooltip, "\n", "<br>")
227226

228227
// Use backticks for keyboard keys. Two backticks are needed with an inner space
229228
// to escape a key that is itself a backtick.

0 commit comments

Comments
 (0)