Markdown code block rendering issues
Noticed a lot of rendering issues when moving Markdown files from GitHub to GitLab. Code blocks seem to be overly sensitive to the content before the starting back ticks and after the ending back ticks. For example, I cannot get the first block to work without making the subsequent sentence a list item.
Here's the Markdown source:
And what it looks like when rendered:
A second example of ending with a Markdown file with a code block, even with multiple newline characters after the end of the code block:
And rendered:
Keep in mind that these were all rendering fine in GitHub, so I consider this a compatibility bug with the Markdown engine used by GitLab. I actually had to do a lot of refactoring to make it look this good, including replacing bash with shell (which shouldn't matter, but it does for some reason). The engine also seems to be very particular about having an empty line after the end of a code block, whereas GitHub didn't care. A lot of these issues seem to be related with how the engine deals with lists as well.
EDIT:
Forgot to mention:
- GitLab: 10.2.4 on Ubuntu 16.04 LTS
- Browser: Chrome 62 on macOS 10.12.6



