From d09b4319323f309539524f3bb7cfac0313b026d4 Mon Sep 17 00:00:00 2001 From: C4 Patino Date: Thu, 11 Aug 2022 21:59:45 -0500 Subject: [PATCH] Parse out markdown on list elements --- client/src/components/ListAnswer.jsx | 2 +- client/src/components/ListQuestion.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/ListAnswer.jsx b/client/src/components/ListAnswer.jsx index 1817579..16147e8 100644 --- a/client/src/components/ListAnswer.jsx +++ b/client/src/components/ListAnswer.jsx @@ -32,7 +32,7 @@ export default function ListAnswer({ to={`/questions/${question_id}`} style={{ textDecoration: 'none', color: 'inherit' }} > - {text.split(' ').slice(0, 150).join(' ') + '...'} + {text.replace(/<[^>]*>?/gm, '')} diff --git a/client/src/components/ListQuestion.jsx b/client/src/components/ListQuestion.jsx index 6ef1a33..54d1163 100644 --- a/client/src/components/ListQuestion.jsx +++ b/client/src/components/ListQuestion.jsx @@ -37,7 +37,7 @@ export default function ListQuestion({ [{status}] {title} - {text} + {text.replace(/<[^>]*>?/gm, '')}