fix shell tool regex pattern for git commit messages

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
koalazf.99
2025-08-07 15:56:07 +08:00
parent aa837d1e9a
commit 7d978fc3b6

View File

@@ -406,7 +406,7 @@ Co-authored-by: ${gitCoAuthorSettings.name} <${gitCoAuthorSettings.email}>`;
// Handle different git commit patterns // Handle different git commit patterns
// Match -m "message" or -m 'message' // Match -m "message" or -m 'message'
const messagePattern = /(-m\s+)(['"])((?:[^\\]|\\.)*)(\2)/; const messagePattern = /(-m\s+)(['"])((?:\\.|[^\\])*?)(\2)/;
const match = command.match(messagePattern); const match = command.match(messagePattern);
if (match) { if (match) {