First line of code block without language specifier is indented extra 2px

Steps to reproduce

type the following into a new note (use help vault to reproduce):

image

Expected result (preview)

image

Actual result (first line is indented)

image

Environment

  • Operating system: macOS 12.0.1
  • Obsidian version: 0.13.5

Workaround

Adding the following custom CSS “fixes” it

.markdown-preview-view code {
	padding: 0px;
}
1 Like

Hmm, that’s odd. What does the inspector say the padding CSS is coming from (hit cmd + shift + i)?
In a new note in the help notes vault, I’m not getting that indent. According to my inspector, there is a padding rule for .markdown-preview-view code but it is overridden by another rule for .markdown-preview-view pre code.


I’m on Windows 10, with Obsidian v0.12.19

@Craftidore This is a new bug for 0.13.x

1 Like