(core) Treating API urls as external in cells

Summary:
Links for the API endpoints in a cell didn't work as they were interpreted as
internal routes. Now they are properly detected as external.

Test Plan: Added new test

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4078
This commit is contained in:
Jarosław Sadziński
2023-10-17 18:31:33 +02:00
parent 77726849ad
commit 69d5ee53a8
5 changed files with 50 additions and 8 deletions

View File

@@ -45,6 +45,18 @@ describe('gristUrls', function() {
{params: {themeName: 'GristDark'}},
);
});
it('should detect API URLs', function() {
assertUrlDecode(
'http://localhost/o/docs/api/docs',
{api: true},
);
assertUrlDecode(
'http://public.getgrist.com/api/docs',
{api: true},
);
});
});
describe('parseFirstUrlPart', function() {