diff --git a/wrapBody.go b/wrapBody.go index 3c0ac3291f5e99736d6890bc6114e173745549ef..37fbe72808ae44180cb328e6789ff8c3023d4f9d 100644 --- a/wrapBody.go +++ b/wrapBody.go @@ -26,6 +26,12 @@ func formatBody(body string) (string, error) { } for _, line := range lines { + // Preserve indented lines (4+ spaces or tab) as preformatted code + if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { + result = append(result, line) + continue + } + trimmed := strings.TrimSpace(line) if trimmed == "" { flushPlainText()