leerob / site

My site built with Next.js, Tailwind, and Vercel.
https://leerob.com
7.2k stars 1.39k forks source link

Markdown table not rendering in blog post #716

Closed upenr closed 5 months ago

upenr commented 5 months ago

I have a table like this in my blog1.mdx file.

| On Sep. 6, 2020 unless indicated | Alphabet | Apple | | --- | --- | --- | | Price | 1,591.04 | 120.96 | | Number of shares outstanding | 733M | 17.1B | | Market value of common | 1.20T | 2.136T | | Debt | 16.14B | 122.19B | | Preferred stock | -- | -- | | Total capitalization at market | 1.117T | 2.069T | | Book value per share (MRQ) | 304.34 | 4.22 | | Sales (TTM) | 166.03B | 273.85B | | Net income (TTM) | 31.53B | 55.25B | | Earned per share, 2019 (Diluted) | 52.38 | 11.89 | | Earned per share, 2015 (Diluted) | 22.84 | 9.22 | | Earned per share, 2010 (Diluted) | 13.16 | 2.16 | | Current dividend rate | 0 | 3.28 | | Dividends since | N/A | 1987 | | Ratios: | | | | Price/earnings | 34.97 | 36.70 | | Price/book value (MRQ) | 5.37 | 25.51 | | Dividend yield | 0 | 0.66% | | Net/sales | 18.99% | 21.33% | | Earnings/book value (TTM to MRQ book) | 0.15x | 0.78x | | Current assets/Current liabilities (2019) | 3.37x | 1.54x | | Working capital/debt (2019) | 2.7x | 0.36x | | Growth in per-share earnings | | | | 2019 versus 2015 | 129.33% | 28.96% | | 2015 versus 2010 | 73.55% | 326.85% | Table 1. Ben Graham style company attributes

The blog post also renders it with pipes and doesn't seem to convert it to table.

leerob commented 5 months ago

You'll need to use the table component. I didn't use GitHub flavored markdown for my MDX setup.