Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(emails): show escaped ampersands once in catalogue excerpts
Richie McIlroyef517c9cb2d8
diff --git a/emails/CATALOG.md b/emails/CATALOG.mdindex 94ad0d852..20bc77077 100644--- a/emails/CATALOG.md+++ b/emails/CATALOG.md@@ -619,7 +619,7 @@ We're adding a logo wall to the Cap website to show the teams using Cap, and I'dWe're also putting together case studies, and it'd be great to feature your team in one of those too.-If you're enjoying Cap and would like to be featured, just reply and let me know if you're happy to be on the logo wall, do a case study, or both. For a case study, I'll send you a short Q&amp;A to fill in.+If you're enjoying Cap and would like to be featured, just reply and let me know if you're happy to be on the logo wall, do a case study, or both. For a case study, I'll send you a short Q&A to fill in.It'd really help Cap move into the next stage of our growth, and help us tell other great teams like yours all about Cap.diff --git a/scripts/emails/catalog.test.ts b/scripts/emails/catalog.test.tsindex f46d2bafb..1f6c02559 100644--- a/scripts/emails/catalog.test.ts+++ b/scripts/emails/catalog.test.ts@@ -23,6 +23,10 @@ describe("email library", () => {expect(catalogExcerpt("<Paragraph>Record & share<Br />Next step</Paragraph>"),).toBe("Record & share\nNext step");+ expect(catalogExcerpt("<Paragraph>Q&A</Paragraph>")).toBe("Q&A");+ expect(catalogExcerpt("<Paragraph>&lt;b&gt;</Paragraph>")).toBe(+ "&lt;b&gt;",+ );});test("every template and known application send source is registered", async () => {expect(await validateCatalog()).toEqual([]);diff --git a/scripts/emails/catalog.ts b/scripts/emails/catalog.tsindex a5f72166b..71825b697 100644--- a/scripts/emails/catalog.ts+++ b/scripts/emails/catalog.ts@@ -192,6 +192,7 @@ export const catalogExcerpt = (body: string) =>.replace(/<\/(Paragraph|Button)>/g, "\n\n").replace(/<Br\s*\/>/g, "\n").replace(/<\/?(?:Paragraph|Button|Link|Strong|Em|Image)\b[^>]*>/g, "")+ .replaceAll("&", "&").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")