spr icon indicating copy to clipboard operation
spr copied to clipboard

Spaces are stripped from commit bodies

Open leoluk opened this issue 3 years ago • 2 comments

A Git commit with this message:

This is a test:
    A B C

...results in a PR with this body:

This is a test:
A B C

leoluk avatar Feb 16 '22 21:02 leoluk

@josephschmitt : looks like this is caused by TrimSpace from 1606b8ff251c2931:

 func formatBody(commit git.Commit, stack []*github.PullRequest) string {
+       body := wrapInMarkdown(commit.Body)
+
        if len(stack) <= 1 {
-               return wrapInMarkdown(commit.Body)
+               return strings.TrimSpace(body)
+       }

ejoffe avatar Feb 23 '22 03:02 ejoffe

I also just got this effect.

In git log:

image

In GitHub UI:

image

dko-slapdash avatar Sep 10 '22 04:09 dko-slapdash