Search code examples
githubmarkdowngithub-flavored-markdown

Unable to render table on GitHub Readme


| Reference        | Contract          | 
| ------------- |:-------------:| -----:|
| EIP-20 Token      | 0x4c7507262dA41A5A96ae3F836D602d74Eb10A6d0 | 
| Uniswap V2     | 0x35775d560e7e0370259c69475c44dbe5cf183afa     |  
| Uniswap V3 |  0xa00822c70f9ba29d74d92207c798c0d9cad3735e   |

This is my code for Readme table. It is working on VSC with a Markdown Preview and here on Stack Overflow:

Reference Contract
EIP-20 Token 0x4c7507262dA41A5A96ae3F836D602d74Eb10A6d0
Uniswap V2 0x35775d560e7e0370259c69475c44dbe5cf183afa
Uniswap V3 0xa00822c70f9ba29d74d92207c798c0d9cad3735e

but not working well on GitHub.


Solution

  • As I suspect @jonrsharpe alludes, you have a syntactical error. Your delimiter row (second line) specifies three columns. However, your header row (line 1) and data rows (lines 3 and 4) have just two columns. See GitHub Flavored Markdown, Tables.

    Remove the extraneous third column from your header specification (line 2) like this:

    | Reference        | Contract          | 
    | ------------- |:-------------:|
    | EIP-20 Token      | 0x4c7507262dA41A5A96ae3F836D602d74Eb10A6d0 | 
    | Uniswap V2     | 0x35775d560e7e0370259c69475c44dbe5cf183afa     |  
    | Uniswap V3 |  0xa00822c70f9ba29d74d92207c798c0d9cad3735e   |