Ignore absolute URIs when resolving refs

Do not output bogus warnings in the case of links that goes to other
websites.
This commit is contained in:
Hornwitser 2025-01-25 08:52:08 +01:00
parent cf3229423b
commit ef8aaa6f6d
2 changed files with 9 additions and 1 deletions

View file

@ -48,4 +48,10 @@ suite("function resolveRefs", () => {
resolveRefs(el, "/");
assert.deepEqual(el, elFn());
});
test("ignores absolute URIs", () => {
const el = <div>Content with <a href="https://example.org/page.html">Link</a></div>;
const resEl = resolveRefs(el, "/");
assert.equal(el, resEl);
});
});