Skip to content
Merged

Latex #299

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/article-creator/Renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ const customParsers: Record<
const rows = content.map((row, index) => {
if (withHeadings && index === 0) {
return `<tr class="divide-x-[1px]">${row.reduce(
(acc, cell) => acc + `<th>${cell}</th>`,
(acc, cell) => acc + `<th>${parseLatex(cell)}</th>`,
"",
)}</tr>`;
}

// For other rows, use <td> tags
return `<tr class="divide-x-[1px]">${row.reduce(
(acc, cell) => acc + `<td>${cell}</td>`,
(acc, cell) => acc + `<td>${parseLatex(cell)}</td>`,
"",
)}</tr>`;
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/article-creator/editorjs-render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ const customParsers: Record<
const rows = content.map((row, index) => {
if (withHeadings && index === 0) {
return `<tr class="divide-x-[1px]">${row.reduce(
(acc, cell) => acc + `<th>${cell}</th>`,
(acc, cell) => acc + `<th>${parseLatex(cell)}</th>`,
"",
)}</tr>`;
}

// For other rows, use <td> tags
return `<tr class="divide-x-[1px]">${row.reduce(
(acc, cell) => acc + `<td>${cell}</td>`,
(acc, cell) => acc + `<td>${parseLatex(cell)}</td>`,
"",
)}</tr>`;
});
Expand Down
Loading