From b87de1bc5ac10b34f1e8b7eec590c13cda548826 Mon Sep 17 00:00:00 2001 From: davidpmccormick Date: Wed, 18 Sep 2024 11:35:52 +0100 Subject: [PATCH] Make regex a bit more resilient --- prismic-model/lintPrismicData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prismic-model/lintPrismicData.ts b/prismic-model/lintPrismicData.ts index 1279dd4561..3afaab075a 100644 --- a/prismic-model/lintPrismicData.ts +++ b/prismic-model/lintPrismicData.ts @@ -147,7 +147,7 @@ function detectNonPromoImageStories(doc: any): string[] { function detectIncorrectAudioVideoDuration(doc: any): string[] { const guideStopSlices = doc?.data?.slices?.filter(s => s.slice_type === 'guide_stop') || []; - const regex = /^\d{2}:\d{2}$/; // e.g. 03:30 + const regex = /^(\d{2,}:)?[0-5][0-9]:[0-5][0-9]$/; // e.g. 03:30 (optionally 01:03:30) const audioErrors = guideStopSlices .filter(