Skip to content

Commit f3b364b

Browse files
committed
fix getFileCommitDate when options display signature
1 parent f42e98e commit f3b364b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/docusaurus-utils/src/gitUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ export async function getFileCommitDate(
145145
}
146146

147147
const regex = includeAuthor
148-
? /^RESULT:(?<timestamp>\d+),(?<author>.+)$/
149-
: /^RESULT:(?<timestamp>\d+)$/;
148+
? /(?:^|\n)RESULT:(?<timestamp>\d+),(?<author>.+)(?:$|\n)/
149+
: /(?:^|\n)RESULT:(?<timestamp>\d+)(?:$|\n)/;
150150

151151
const output = result.stdout.trim();
152152

0 commit comments

Comments
 (0)