We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 131eada commit 2593f83Copy full SHA for 2593f83
1 file changed
ts/Catalog.ts
@@ -322,6 +322,22 @@ export class Catalog {
322
}
323
return undefined;
324
325
+
326
+ matchURI(uri: string): string | undefined {
327
+ if (uri) {
328
+ // Apply URI rewrites first
329
+ for (let pair of this.uriRewrites) {
330
+ if (uri.startsWith(pair[0])) {
331
+ uri = pair[1] + uri.substring(pair[0].length);
332
+ }
333
334
+ // Look up in URI catalog
335
+ if (this.uriCatalog.has(uri)) {
336
+ return this.uriCatalog.get(uri);
337
338
339
+ return undefined;
340
341
342
343
0 commit comments