(filename, commitMsg string)
| 47 | |
| 48 | return commitMsg |
| 49 | } |
| 50 | |
| 51 | // stripLeadingEmoji removes a leading emoji (and any surrounding spaces) so |
| 52 | // the conventional-commit prefix can be detected right after it. |
| 53 | func stripLeadingEmoji(s string) string { |
| 54 | return strings.TrimLeftFunc(s, func(r rune) bool { |
| 55 | return !unicode.IsLetter(r) && !unicode.IsDigit(r) |
| 56 | }) |
| 57 | } |
| 58 | |
| 59 | // insertPrefix adds the missing conventional-commit prefix right after any |