Text with indent after empty line

Hi everyone! I’m happy to join the Obsidian community!
I have a tiny problem, and it is best illustrated in this screenshot:

Why is this happening? And how can I change this formatting? (I know it can be done in a custom CSS file, but I don’t know the name of the element.)
I’m not sure what I put it clearly, because I’m not very good at writing in English yet. If you have any questions, I am ready to answer them.

PS I’m still not sure why this is happening, but I also found this:

image

Hi, Haru. I have checked it out and found that as below:

.cm-s-obsidian span.cm-inline-code

It seems to be an inline-code element.

BTW, you can press Ctrl+Shift+i to toggle the developer window to see the element selector.

I think this article should be helpful:
Getting comfortable with Obsidian CSS

1 Like

To create a code block, you have two options. First is to use 3 backticks at the beginning and at the end

function myFunc() {
  // do something
}

Or to use indentation of 4 spaces.

function myFunc() {
  // do something
}

And that’s why it happens. That’s standard markdown, I am not sure if you’re able to disable it.

You should be able to view the Raw Code of this comment, I believe.

1 Like

Whoa! Thank you AlanLee! This is even more than I expected!

But still…
I looked in the documentation and found this:

Text indented with a tab is formatted like this, and will also look like a code block in preview.

But why?
It seems very intuitive for me to use tab to… indent, and not for a code block (Maybe it’s just for me. Or I don’t understand something.)

Got it. Thank’s Maned!