From c0e7f7f7dc5effce6498021bb6fc211eb2112c96 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Tue, 23 Mar 2021 11:09:02 +1100 Subject: [PATCH] Fixes #83 This regex change should match the dotnet format with or without milliseconds --- src/utils/parse-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/parse-utils.ts b/src/utils/parse-utils.ts index ff39a44..8316b7a 100644 --- a/src/utils/parse-utils.ts +++ b/src/utils/parse-utils.ts @@ -1,6 +1,6 @@ export function parseNetDuration(str: string): number { // matches dotnet duration: 00:00:00.0010000 - const durationRe = /^(\d\d):(\d\d):(\d\d\.\d+)$/ + const durationRe = /^(\d\d):(\d\d):(\d\d($|\.\d+$))/ const durationMatch = str.match(durationRe) if (durationMatch === null) { throw new Error(`Invalid format: "${str}" is not NET duration`)