(message string)
| 2952 | } |
| 2953 | |
| 2954 | func splitCommitMessageParagraphs(message string) []string { |
| 2955 | lines := strings.Split(message, "\n") |
| 2956 | var paragraphs []string |
| 2957 | var current []string |
| 2958 | |
| 2959 | for _, line := range lines { |
| 2960 | if strings.TrimSpace(line) == "" { |
| 2961 | if len(current) > 0 { |
| 2962 | paragraphs = append(paragraphs, strings.Join(current, "\n")) |
| 2963 | current = nil |
| 2964 | } |
| 2965 | continue |
| 2966 | } |
| 2967 | |
| 2968 | current = append(current, strings.TrimRight(line, " \t")) |
| 2969 | } |
| 2970 | |
| 2971 | if len(current) > 0 { |
| 2972 | paragraphs = append(paragraphs, strings.Join(current, "\n")) |
| 2973 | } |
| 2974 | |
| 2975 | return paragraphs |
| 2976 | } |
| 2977 | |
| 2978 | func trimMatchingQuotes(message string) string { |
| 2979 | if len(message) >= 2 { |
no outgoing calls
no test coverage detected