From 687824d0e9000914f618483df2e5190a5ce7a74e Mon Sep 17 00:00:00 2001 From: Aashish <83752052+120EE0692@users.noreply.github.com> Date: Sat, 5 Nov 2022 22:36:27 +0530 Subject: [PATCH] fix: table first cell (#300) --- client/src/components/article/ArticleTable.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/components/article/ArticleTable.js b/client/src/components/article/ArticleTable.js index 2679bf71..2aadeb87 100644 --- a/client/src/components/article/ArticleTable.js +++ b/client/src/components/article/ArticleTable.js @@ -17,7 +17,11 @@ const ArticleTable = ({ data, blockFormatting }) => { .replace(/\\\"/g, '') .split('],[') .map((row) => row.split(',')) - .map((row) => row.map((cell) => cell.slice(1, -1))); + .map((row, index) => + row.map((cell, _index) => + index === 0 && _index === 0 ? cell.slice(0, -1) : cell.slice(1, -1), + ), + ); const { hasHeaderColumn, hasHeaderRow } = blockFormatting;