From 52a85abe5205b347b6a434c6ad393bd95aefff99 Mon Sep 17 00:00:00 2001 From: Amirabbas Ghasemi Date: Fri, 10 Jan 2025 18:22:35 +0330 Subject: [PATCH] fix: filter example heading in markdown purview in registry card (#1444) --- apps/frontend/components/templates/Registry/helpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/frontend/components/templates/Registry/helpers.ts b/apps/frontend/components/templates/Registry/helpers.ts index 400519245..10e1b4d79 100644 --- a/apps/frontend/components/templates/Registry/helpers.ts +++ b/apps/frontend/components/templates/Registry/helpers.ts @@ -19,7 +19,10 @@ export const getDescriptionShortText = (description: string) => { const descriptionWithoutHeadings = description .split("\n") .filter( - (line) => !line.startsWith("# ") && !line.startsWith("## Description"), + (line) => + !line.startsWith("# ") && + !line.startsWith("## Description") && + !line.startsWith("## Example"), ) .join("\n");