From d56e81b51d707c7375ebefdd910f52db2d5687bc Mon Sep 17 00:00:00 2001 From: Lim Ding Wen Date: Sun, 28 Jul 2024 09:52:20 +0800 Subject: [PATCH] Add proc text to italic filtering --- site/src/app/components/DebateSpeechCard.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/site/src/app/components/DebateSpeechCard.tsx b/site/src/app/components/DebateSpeechCard.tsx index 9f440a6..0a9445b 100644 --- a/site/src/app/components/DebateSpeechCard.tsx +++ b/site/src/app/components/DebateSpeechCard.tsx @@ -4,6 +4,12 @@ import StandardCardDescription from "@/app/components/StandardCardDescription"; import Markdown from "react-markdown"; import React from "react"; +function formatProcText(content: string) { + return content + .replaceAll("[(proc text) ", "*") + .replaceAll(" (proc text)]", "*"); +} + export default function DebateSummary({ debateSpeech, }: { @@ -15,7 +21,7 @@ export default function DebateSummary({ {debateSpeech.speaker_name} )} - {debateSpeech.content} + {formatProcText(debateSpeech.content)} );