This commit is contained in:
Joao Moreno committed 2019-11-08 12:53:26 +01:00
1 parent dd8b177a2f
commit 062d516448
1 file changed
+6
+6
View File
@@ -1813,6 +1813,12 @@ export class Repository {
}
cleanupCommitEditMessage(message: string): string {
// If the message is a single line starting with whitespace followed by `#`, just allow it.
if (/^\s*#[^\n]*$/.test(message)) {
return message;
}
// Else, remove all lines starting with whitespace followed by `#`.
//TODO: Support core.commentChar
return message.replace(/^\s*#.*$\n?/gm, '').trim();
}