Skip to content

Commit

Permalink
fix: table first cell (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
120EE0692 authored Nov 5, 2022
1 parent 2709a99 commit 687824d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/components/article/ArticleTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 687824d

Please sign in to comment.