зеркало из https://github.com/mislav/hub.git
Compensate for CR-LF line endings when editing issues/releases
A body will typically have CR-LF when it was authored using web UI on Windows.
This commit is contained in:
Родитель
6597192503
Коммит
153d8eda19
|
@ -660,7 +660,7 @@ func updateIssue(cmd *Command, args *Args) {
|
|||
Filename: "ISSUE_EDITMSG",
|
||||
Title: "issue",
|
||||
Edit: args.Flag.Bool("--edit"),
|
||||
Message: fmt.Sprintf("%s\n\n%s", issue.Title, issue.Body),
|
||||
Message: strings.Replace(fmt.Sprintf("%s\n\n%s", issue.Title, issue.Body), "\r\n", "\n", -1),
|
||||
}
|
||||
|
||||
messageBuilder.AddCommentedSection(fmt.Sprintf(`Editing issue #%d for %s
|
||||
|
|
|
@ -596,7 +596,7 @@ text is the title and the rest is the description.`, tagName, project))
|
|||
messageBuilder.Edit = args.Flag.Bool("--edit")
|
||||
} else {
|
||||
messageBuilder.Edit = true
|
||||
messageBuilder.Message = fmt.Sprintf("%s\n\n%s", release.Name, release.Body)
|
||||
messageBuilder.Message = strings.Replace(fmt.Sprintf("%s\n\n%s", release.Name, release.Body), "\r\n", "\n", -1)
|
||||
}
|
||||
|
||||
title, body, err := messageBuilder.Extract()
|
||||
|
|
Загрузка…
Ссылка в новой задаче