diff --git a/utils/utils.go b/utils/utils.go index c84860d9e..885e5ea10 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -26,6 +26,9 @@ func RenderMarkdown(text string) (string, error) { if isColorEnabled() { style = "dark" } + // Glamour rendering preserves carriage return characters in code blocks, but + // we need to ensure that no such characters are present in the output. + text = strings.ReplaceAll(text, "\r\n", "\n") return glamour.Render(text, style) }