I would like to write a coding standard specification document with good and bad coding examples. Each rule should have a number, a description and an exam
While this doesn't work for all markdown's, I got this to work with GitLab, Github, and mdBook. I thought I'd share this answer.
Basically, you create the table via HTML. Markdown and HTML don't mix well, but if you surround the markdown with white-space, sometimes the markdown can be recognized.
https://docs.gitlab.com/ee/user/markdown.html#inline-html
Good
Bad
```c++
int foo() {
int result = 4;
return result;
}
```
```c++
int foo() {
int x = 4;
return x;
}
```