Skip to content

Commit 520035f

Browse files
author
Christian Richter
committed
Properly format the issue body within the org-file
Signed-off-by: Christian Richter <crichter@suse.com>
1 parent 83abb59 commit 520035f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cmd/github2orgmode/github2orgmode.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ func main() {
6060
}
6161
o = append(o, fmt.Sprintf("\t[%s]", i.GetURL()))
6262
o = append(o, "\n")
63-
o = append(o, strings.ReplaceAll(i.GetBody(), "\r\n", "\n"))
63+
o = append(o, formatBody(i.GetBody()))
64+
o = append(o, "\n")
6465
}
6566
}
6667
fmt.Printf(strings.Join(o, "\n") + "\n")
6768
}
69+
70+
func formatBody(body string) string {
71+
body = strings.ReplaceAll(body, "\r\n", "\n\t")
72+
return "\t" + body
73+
}

0 commit comments

Comments
 (0)