cardSchema: take innerHTML instead, force type to 'link' if html is empty

This commit is contained in:
Alex Gleason 2024-03-14 19:09:00 -05:00
parent d53c1c2227
commit 8633eca37d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -76,7 +76,11 @@ const cardSchema = z.object({
}
});
card.html = html.outerHTML;
card.html = html.innerHTML;
if (!card.html) {
card.type = 'link';
}
return card;
});