Skip to content

Commit

Permalink
fix: filter example heading in markdown purview in registry card (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
amirabbas-gh authored Jan 10, 2025
1 parent 2b95824 commit 52a85ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/frontend/components/templates/Registry/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 52a85ab

Please sign in to comment.