registration: Fix 'arbitrary ResourceLoaderModule definition' schema regex
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 23 Feb 2019 01:03:01 +0000 (17:03 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 23 Feb 2019 01:03:01 +0000 (17:03 -0800)
We want this regex to match on everything that is not the literal string
'ResourceFileModule' or 'ResourceImageModule' (actually
'ResourceLoaderWikiModule' should be in this too, but I'll fix that in a
follow-up). But the current regex would not match if one of those was in a
substring.

The new regex should match everything that is *not* those two strings.

Bug: T216861
Change-Id: I7d888adfdc67b2075028e49432710308aa0125af

docs/extension.schema.v1.json
docs/extension.schema.v2.json

index f9b71fb..2174ddb 100644 (file)
                                                        "properties": {
                                                                "class": {
                                                                        "type": "string",
-                                                                       "pattern": "^((?!ResourceLoader(File|Image)Module).)*$"
+                                                                       "pattern": "^(?!ResourceLoader(File|Image)Module).*$"
                                                                }
                                                        },
                                                        "required": ["class"]
index 22edac0..d634f70 100644 (file)
                                                        "properties": {
                                                                "class": {
                                                                        "type": "string",
-                                                                       "pattern": "^((?!ResourceLoader(File|Image)Module).)*$"
+                                                                       "pattern": "^(?!ResourceLoader(File|Image)Module).*$"
                                                                }
                                                        },
                                                        "required": ["class"]