📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix icons rendering
Blue Mouse6bd788b7d915
diff --git a/web/app/utils/getPosts.ts b/web/app/utils/getPosts.tsindex bf0808a16..62bfd5d55 100644--- a/web/app/utils/getPosts.ts+++ b/web/app/utils/getPosts.ts@@ -45,6 +45,9 @@ function isSectionHeaderRow(row: Tokens.TableCell[]): boolean {return isBold && otherCellsEmpty}+// Emoji patterns that should be centered in table cells+const CENTERED_EMOJI_CELLS = ['✅', '❌', '⚠️']+// Custom table rendering with improved stylingrenderer.table = ({ header, rows }: Tokens.Table) => {const headerCells = header@@ -66,10 +69,13 @@ renderer.table = ({ header, rows }: Tokens.Table) => {// Regular rowreturn `<tr class="border-b border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors">${row- .map(- (cell) =>- `<td class="px-4 py-3 text-sm text-slate-700 dark:text-slate-300">${parseInlineMarkdown(cell.text)}</td>`,- )+ .map((cell) => {+ const isEmojiOnly = CENTERED_EMOJI_CELLS.includes(cell.text.trim())+ const cellClass = isEmojiOnly+ ? 'px-4 py-3 text-sm text-slate-700 dark:text-slate-300 text-center'+ : 'px-4 py-3 text-sm text-slate-700 dark:text-slate-300'+ return `<td class="${cellClass}">${parseInlineMarkdown(cell.text)}</td>`+ }).join('')}</tr>`}).join('')