aboutsummaryrefslogtreecommitdiff
path: root/common/jsonschema.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-06-18 13:51:20 +0200
committerWojtek Kosior <koszko@koszko.org>2022-06-18 13:51:20 +0200
commit1f9ccef9b99a1adfa53cf1a22543f4bdbe2ac068 (patch)
tree2dcaaed5343b4aa8bb83eeaa447b7f958a40c933 /common/jsonschema.js
parentf33dbdee39953f145bb986a7488e65e55e25d49d (diff)
downloadbrowser-extension-1f9ccef9b99a1adfa53cf1a22543f4bdbe2ac068.tar.gz
browser-extension-1f9ccef9b99a1adfa53cf1a22543f4bdbe2ac068.zip
restore compatibility with IceCat 60
This commit also fixes the --driver option to configure script.
Diffstat (limited to 'common/jsonschema.js')
-rw-r--r--common/jsonschema.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/jsonschema.js b/common/jsonschema.js
index 9c4a70c..3a82702 100644
--- a/common/jsonschema.js
+++ b/common/jsonschema.js
@@ -57,7 +57,7 @@
#FROM common/jsonschema/scan.js IMPORT SchemaScanResult, scan
-#FROM common/entities.js IMPORT haketilo_schema_name_regex
+#FROM common/entities.js IMPORT parse_schema_uri
#EXPORT scan
#EXPORT SchemaScanResult
@@ -89,9 +89,8 @@ const haketilo_schemas = [
].reduce((ac, s) => Object.assign(ac, {[s.$id]: s}), {});
for (const [$id, schema] of [...Object.entries(haketilo_schemas)]) {
- const match = haketilo_schema_name_regex.exec($id);
- const schema_name =
- `${match.groups.name_base}-${match.groups.major}.schema.json`;
+ const parsed = parse_schema_uri($id);
+ const schema_name = `${parsed.name_base}-${parsed.major}.schema.json`;
haketilo_schemas[schema_name] = schema;
}