From 75728d629fb8b4a81def031a15b37af3c3d0999a Mon Sep 17 00:00:00 2001 From: Dos Moonen Date: Fri, 26 Jan 2024 14:10:42 +0100 Subject: [PATCH] Replace regex which allows dubble hyphens by one that does not. The current version disallows tripple hyphens but allows dubble hyphens. (It also seems overcomplicated) Alternatively we can make it a negative lookbehind instead of a negative lookahead, but the complexity is much higher. See https://regex101.com/r/Xyu0bt/1 for proof the current version matches double hyphens --- source/specifications/core-metadata.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/core-metadata.rst b/source/specifications/core-metadata.rst index 7ea0ccf3b..90793c791 100644 --- a/source/specifications/core-metadata.rst +++ b/source/specifications/core-metadata.rst @@ -631,7 +631,7 @@ of lowercase ASCII letters, ASCII numbers, and hyphen. It must start and end with a letter or number. Hyphens cannot be followed by another hyphen. Names are limited to those which match the following regex (which guarantees unambiguity):: - ^([a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9])$ + ^[a-z0-9]+(-[a-z0-9]+)*$ The specified name may be used to make a dependency conditional on whether the