Credits keep their linked words: only the words a source linked are the link

A credit read from markup keeps the first link's own words as linkText, and the Cesium credit display and the credit line link just those words, as the source wrote them (Street Level's "© Mapillary contributors" links Mapillary only). The Street Level gate reads a drawn item's pick id from its draw-set id.
This commit is contained in:
Sameh Khamis committed 2026-11-15 20:12:14 -08:00
1 parent 74673f3c85
commit a7fe3eebc6
9 files changed
+123 -8

No files matched your search

+11
View File
@@ -94,6 +94,7 @@ test('Cesium’s own credits are listed as plain data, the logo first', () => {
{
text: 'Data © Example & others',
href: 'https://example.com/a',
linkText: 'Example',
inline: false,
},
]);
@@ -422,3 +423,13 @@ test('a Cesium viewer with no renderer gets a credits port over its display', ()
assert.equal(listeners.size, 1);
assert.equal(findCredits({ creditDisplay: display }), null, 'no scene');
});
test('only the linked words are the link in the credit markup', () => {
const html = creditMarkup({
text: 'Street Level: imagery © Mapillary contributors, CC BY-SA 4.0',
href: 'https://www.mapillary.com/',
linkText: 'Mapillary',
});
assert.ok(html.includes('© <a href="https://www.mapillary.com/"'), html);
assert.ok(html.includes('>Mapillary</a> contributors, CC BY-SA 4.0'), html);
});