chore: update MindSpace brand footer text
This commit is contained in:
@@ -11,19 +11,20 @@ import {
|
||||
test('normalizePlatformBrandHtml rewrites tkmind.ai to tkmind.cn', () => {
|
||||
const html = '<a href="mailto:contact@tkmind.ai">📧 contact@tkmind.ai</a>';
|
||||
const result = normalizePlatformBrandHtml(html);
|
||||
assert.match(result, /contact@tkmind\.cn/);
|
||||
assert.match(result, /TKMind · 智趣/);
|
||||
assert.doesNotMatch(result, /tkmind\.ai/i);
|
||||
assert.doesNotMatch(result, /contact@tkmind\.cn/i);
|
||||
});
|
||||
|
||||
test('ensurePlatformBrandPageTags adds platform-brand marker to contact line', () => {
|
||||
const html = '<footer><p>📧 contact@tkmind.ai</p></footer>';
|
||||
const result = ensurePlatformBrandPageTags(html);
|
||||
assert.match(result, new RegExp(`${MINDSPACE_PAGE_TAG_ATTR}="${MINDSPACE_PAGE_TAG_PLATFORM_BRAND}"`));
|
||||
assert.match(result, /contact@tkmind\.cn/);
|
||||
assert.match(result, /TKMind · 智趣/);
|
||||
});
|
||||
|
||||
test('prepareHtmlPageBrandMarkers keeps existing marker', () => {
|
||||
const html = `<p ${MINDSPACE_PAGE_TAG_ATTR}="${MINDSPACE_PAGE_TAG_PLATFORM_BRAND}">📧 contact@tkmind.cn</p>`;
|
||||
const html = `<p ${MINDSPACE_PAGE_TAG_ATTR}="${MINDSPACE_PAGE_TAG_PLATFORM_BRAND}">TKMind · 智趣</p>`;
|
||||
const result = prepareHtmlPageBrandMarkers(html);
|
||||
assert.equal(result.match(new RegExp(MINDSPACE_PAGE_TAG_ATTR, 'g'))?.length, 1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user