Search code examples
githubmarkdowngithub-flavored-markdown

Using three hyphens in md files on github to create a table


So I am working with an Rmd file which I later convert into and md file using the knitr package. The md file(not mine, just an example) starts with enter image description here

I am interested in how the text between the hyphens at the top is parsed. I want it to look like a table below, enter image description here

but instead when I wrap the text with three hyphens in my repos I get what is highlighted in green

enter image description here

I have no idea why or what is different in my repo. What I did notice is that if use the three hyphens wrap without using any code chunks in my md file, then I get the desired table. So, somehow the code chunks like that

\```css

code chunk

\```

mess up the three hyphens wrap being parsed as a table. Any ideas of how to resolve this issue? Thanks.


Solution

  • It's not that github is parsing --- as a table delimiter, it is specifically parsing a yaml metadata block located at the top of the file (which uses --- as it's delimiters) as a table.

    See here for the announcement.