jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.82k stars 643 forks source link

Left spacing of the first line in the code blocks is different than other lines #70

Open scriptype opened 7 years ago

scriptype commented 7 years ago

I'm talking about this:

image

First line has a little more space on the left side. With inspector, I can see it's because an inline element (code) is used to wrap the text inside the block. And it has 3px padding-left, which only applies to the first line, since it's an inline element.

image

A possible solution would be to give display: block or display: inline-block to the code. But I guess using code elements for code blocks is against its intended semantics, be it fixed with my solution or not.