diff --git a/src/rules/no-default-alt-text.js b/src/rules/no-default-alt-text.js index 3254561..e91a9ef 100644 --- a/src/rules/no-default-alt-text.js +++ b/src/rules/no-default-alt-text.js @@ -3,9 +3,10 @@ * * "Screen Shot 2020-10-20 at 2 52 27 PM" * * "Screenshot 2020-10-20 at 2 52 27 PM" * * "Clean Shot 2020-10-20 @45x" + * * "Screencast from 23 02 2024 19 15 19]" */ const defaultScreenshotRegex = - "(?:screen|clean) ?shot \\d{4}-\\d{2}-\\d{2}[^'\"\\]]*"; + "(?:screen|clean) ?(?:shot|cast) \\d{4}-\\d{2}-\\d{2}[^'\"\\]]*"; const imageRegex = "image"; const combinedRegex = `(${[defaultScreenshotRegex, imageRegex].join("|")})`; diff --git a/test/no-default-alt-text.test.js b/test/no-default-alt-text.test.js index 314a781..04fc9fd 100644 --- a/test/no-default-alt-text.test.js +++ b/test/no-default-alt-text.test.js @@ -26,6 +26,7 @@ describe("GH001: No Default Alt Text", () => { test("markdown example", async () => { const strings = [ "![Screen Shot 2022-06-26 at 7 41 30 PM](https://user-images.githubusercontent.com/abcdef.png)", + "![Screencast from 23 02 2024 19 15 19](https://user-images.githubusercontent.com/abcdef.png)", "![ScreenShot 2022-06-26 at 7 41 30 PM](https://user-images.githubusercontent.com/abcdef.png)", "![Screen shot 2022-06-26 at 7 41 30 PM](https://user-images.githubusercontent.com/abcdef.png)", "![Screenshot 2022-06-26 at 7 41 30 PM](https://user-images.githubusercontent.com/abcdef.png)", @@ -50,6 +51,7 @@ describe("GH001: No Default Alt Text", () => { test("HTML example", async () => { const strings = [ 'Screen Shot 2022-06-26 at 7 41 30 PM', + ' Screencast from 23 02 2024 19 15 19', 'ScreenShot 2022-06-26 at 7 41 30 PM', 'Screen shot 2022-06-26 at 7 41 30 PM', 'Screenshot 2022-06-26 at 7 41 30 PM',