catppuccin / obsidian

💎 Soothing pastel theme for Obsidian
MIT License
340 stars 15 forks source link

Bug of todo list with deleted line #51

Closed Les1ie closed 6 months ago

Les1ie commented 9 months ago

code:

- [x] title
  balabala

it will be like this: image

but i don't want the consequent paragraph has deleted line.

mbeckrich commented 9 months ago

Thanks, will take a look and fix soon!

mbeckrich commented 9 months ago

Can you give me a little more detail on this? I am trying to replicate it in Obsidian, but have not been able to. I definitely believe this could be an issue because of how lines of text work with the CSS in Obsidian. One thing you might try:

When the problem occurs, open the web inspector in Obsidian by pressing cmd+opt+i (or ctrl+shift+i on windows/linux). Press the dotted square with an arrow in the top left of your inspector area, which may be on the left side of the app for you, and hover your mouse over the problem area.

image

Then, click on the problem area and send me a screencap of what shows up in the inspector's html area. It should look something like the below. This is what I see on my end, but, in your case, I suspect that 'balabala' is not being separated from .cm-list-1 or something similar to that.

image
Les1ie commented 8 months ago

I found that this issue only occurs in reading mode and is normal in editing mode.

Reading mode: image

Editing mode: image

mbeckrich commented 6 months ago

Hey, sorry, I missed the reply on this somehow. Thanks for that, though. I think this is due to how markdown formatting is rendered in general. This happens even in the default theme for me. If you are still running into this, likely what you will want to do is press enter twice after finishing your list, so that there is a gap between the final list item and your next line of text. See: https://about.gitlab.com/handbook/markdown-guide/#paragraphs-breaks-and-horizontal-lines

This kind of friction occurs in a few Markdown editors, because we're seeing new lines in the editing mode, but when it gets processed according to the Markdown syntax rules, it looks different from the rendering we saw in the editor. As an example, here is IA Writer in editing mode and then reading mode:

image image

And in Obsidian's default theme, the same text:

image image

Obsidian is assuming that a single enter after a word means we want the next word to appear beneath it when rendered in reading mode, whereas IA Writer will wrap text until we hit enter twice. The hiccup then comes when Obsidian then follows Markdown rules with lists, because we're still expecting the assumption it made earlier. My memory of Markdown syntax is a little hazy, but this should be close. I will close this for now, but if you discover something else specific to the theme, let me know! Thanks, and sorry again!