Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix FAQ schema alert sanitization

Manav Rathi98360327800f
diff --git a/docs/docs/.vitepress/config.ts b/docs/docs/.vitepress/config.ts
index 778d08d2ba..856666da87 100644
--- a/docs/docs/.vitepress/config.ts
+++ b/docs/docs/.vitepress/config.ts
@@ -189,6 +189,11 @@ async function generateFAQSchema(pageData: any) {
.replace(/\*\*([^*]+)\*\*/g, "$1") // Bold
.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1") // Links
.replace(/`([^`]+)`/g, "$1") // Inline code
+ .replace(
+ /^\s*>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim,
+ "",
+ ) // GitHub alert labels
+ .replace(/^\s*>\s?/gm, "") // Blockquotes
.replace(/^[-*]\s+/gm, "") // List items
.replace(/\n+/g, " ") // Newlines to spaces
.replace(/\s+/g, " ") // Multiple spaces to single