Live Preview: Better support of code blocks in lists

I still don’t understand why people don’t care about this so important feature …

15 Likes

All of my notes are organized as nested lists, where relationship between contents are naturally indicated by their indentation level.
If would be weird if text, pictures, pdf, etc could be nested list items, while code blocks can not.

2 Likes

Is there a solution?
Source Mode should reject all styles

2 Likes

Taio:

Obsidian:

- this is an ordered list

- with a:

	```bash
	codeblock in it, which indents nicely
	```

- oh look, it even keeps adding bullet points just by pressing enter

```bash
here a non-indented code block

Code via Discord

1 Like

The indentation of the list and code block has been solved.

Linking a question: Code blocks in list error

Please fix this generally.
I think @jerviscui 's solution is just a hack. (add custom css and specific font.)
I want to return to Typora because of this.

You know what, I am going to use Typora until this is fixed.
I think this, supporting code blocks in lists, is not a new feature but bug.

12 Likes

I do not understand why this is not being marked as a top priority? There is no reason whatsoever why a code block should not be able to seamlessly integrate with an ordered/unordered list BY DEFAULT…

PLEASE PRIORITIZE THIS FIX. It is basic functionality and you are alienating an entire category of users (programmers) from wanting to use your tool.

If I was a maintainer, the lack of this feature would be embarrassing, honestly. As @iltaek mentioned this is a BUG not a feature request.

12 Likes

I fully agree.
Codeblocks not being rendered correctly in lists is MOST DEFINITELY a bug.

9 Likes

This is the single feature that should be at the topmost priority. Why is this not being fixed??

5 Likes

The top feature? Come on, take a look at all the feature requests and tell me this is more important than the hundreds of other FRs.

I believe better markdown rendering is fundamental as compared to other features. If this is done, it would be much easier to edit quotes/codes/tables at a bullet (list) level without having to worry about indentation. Currently Typora has a really good markdown experience. This is where obsidian should catch up. If the markdown live editor experience is great, then any other feature would certainly benefit.

I also think it’s more a bug than a feature request.
Maybe not the top bug. But still something to consider.
There are quite a lot of developers amongst Obsidian users, including me.
Also, it may be quite simple to fix? Isn’t it?

Unfortunately, It’s not quite a simple fix. There are several parts of Live Preview that aren’t just buggy but flatout not done (just search “Live Preview Support” ).

I can move it to Bug Reports if it makes you feel better but it wont make this get done any faster. Right now, the attention is elsewhere and these issues will likely be addressed in batch next time LP is reworked. Sorry!

12 Likes

I wouldn’t be as passionate(or perhaps, dramatic) as some people are about this, but I see where they’re coming from. The lack of this feature/bug-fix makes an outliner-loving developer’s workflow essentially impossible in Obsidian.

Or, maybe unexpectedly, this also excudes workflows that depend on “special-block-in-a-list-style” functions. Callouts or block quotes, for example, fall prey to the same sort of malfunction. This means plugins that rely on code blocks, like Dataview or Dynamic TOC, also don’t work in lists. If this were added/fixed, it’d open a whole host of new opportunities for extensibility in lists.

As a developer myself, I understand the shift away from active LP development—it’s exhausting to have to tinker with one thing without end. That said, I’m glad this is still somewhere further down on the docket because it’d be a valuable piece of a more comprehensive Obsidian markdown experience.

I do think this should be under Bug Reports, simply because when I first tried it, I was thinking “okay, this 'oughta work”, rather than “I wonder if this works”. It feels like something you’d expect to be there, yet it isn’t actually there. I think that’s closer to a bug than a feature request, but it probably just comes down to your opinion on semantics.

9 Likes

+1 this is an important issue to fix

7 Likes

+1 ! Poor WYSIWYG rendering is why I hesitate to migrate from LogSeq to Obsidian entirely :sob:

4 Likes

+1! this’s important

3 Likes

+1
this issue is the only bad point

3 Likes