import fix in buildLinkField

This commit is contained in:
2026-10-13 23:51:08 +02:00
parent 7572ec0c04
commit 5af5033148
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ const cssString = (s: string) => `"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"
/** Only plain colour values — the option ends up inside a stylesheet. */
const safeColor = (c: string | undefined, fallback: string) =>
c && /^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
c && /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
export function buildSitemapCss({ accent, credit, title }: SitemapStyleOptions = {}): string {
const heading = title?.trim() || 'XML Sitemap'