lmao. Has this product died?
Ugh, ran into this bug today. Please fix.
Subscribint to this issue.
I guess this is the kind of thing you can get done in logseq and itās almost impossible in every other tool
+1
When will this be fixed? This is fundamental issue. Seriously considering cancelling my subscription as it seems devs donāt care to fix a very important problem.
Hi, may I offer a different perspective.
Iām a non-user, assessing moving from Notion to Obsidian. There are only two things stopping me from moving.
- Tables suck (fixed in 1.5, what good timing!) and
- I canāt nest code in an indented bullet list, which I do an enormous amount in my notes (writing a course)
So although maybe this isnāt the top most important feature for everyone, for this one person at least, itās the only thing Obsidian needs for me to be able to switch from Notion.
And the fact that a two year old bug with so many comments isnāt fixed doesnāt give me the confidence to just switch now and trust itāll be fixed soon.
Hi,
I am a recent one-month user who has just moved from Notion to Obsidian. I donāt regret my decision to move but I do wish the dev team could work on high priority fixes and features at a more time-efficient pace.
- I have tried the new table features in 1.5.0, but I canāt say theyāre as robust as Notionās implementation yet.
- This can be done in a precise way mentioned in someoneās post above.
Basically write your code block on the root base level, select the entire code block and press Tab until it has as many indents as your current list level. Again, not as robust as Notionās so I hope this gets a better UI/UX treatment.
For what itās worth, Iād also enjoy this feature. I make do without using lists for this, but it would certainly be better if ordered and unordered lists supported indented code blocks. Support for this is common in documentation publication toolchains, and both MkDocs and Docusaurus for example support this style of code+steps at proper indentation. It would be great if it worked here, too. It seems to be a solved problem elsewhere, so itās definitely possible. Thanks.
It seems that there is some upstream bug in HyperMD or codemirror as for the following case. The last two lines should not be recognized as part of the code block, but the syntax tree says they are.
Raw markdown
- ```python
print
```
Here is outside the code block!
or
- ```python
print
```
Here is outside the code block!
LIve preview
Reading view
to 2.:
this is not a valid solution.
the tabs will be added to the code when using the copy function (clicking on the code-language indicator).
So tabbing the whole codeblock will ALTER the code (adding tabs), which is an absolute no-go!
I agree with @featurerequestaccoun that altering the code/blockquote with tabs to include it in a bullet or subbullet is not a great solution. Iām not sure how to fix this while staying in valid Markdown but this hampers what you can do with āoutliningā and lists. Itās also not intuitive to include the code block in deeply nested lists, I can never figure out how many indents to add before itās correctly included. Itās fragile.
+1
Iām shocked this has been a large known bug for 2 years now and still not fixed. I often use Obsidian to write myself how-tos for programming and doing terminal stuff and want to have code blocks indented in numbered lists.
This seems like a pretty big missing part of markdown rendering for programmers (probably a fairly large portion of Obsidianās user base).
+1
Just had to deal with this again. I avoided it by just no longer using lists again. But after a while of forgetting about this problem and wanting to use a basic feature like a list, bam, right back to shaking my fist at my nested code block experience.
Just throwing my hat in to agree with everything said so far.
The least annoying way Iāve managed to do things so far is as follows:
- Make a list.
- Shift-Enter to add a new line for the triple backticks:
Shift-Tab the code block until it's completely un-indented.
- Paste in your code.
- Select the entire code block and hit Tab as needed to re-indent to the correct level.
- ???
- Profit.
Source code for the list:
1. Make a list.
1. Shift-Enter to add a new line for the triple backticks:
```text
Shift-Tab the code block until it's completely un-indented.
```
1. Paste in your code.
1. Select the entire code block and hit Tab as needed to re-indent to the correct level.
1. ???
1. Profit.
Amusingly, the syntax highlighting is broken on the block here.
For this step, itās probably easier to just hit Enter repeatedly until the cursor is all the way to the left. (Apparently, many people donāt know that apps often implement the convention that hitting Enter undoes the automatic bulleting and indenting.)
Thatās fair, I suppose Iām just used to treating it like other things Iām trying to enter inline on the same bullet point like images.
I do not understand why this is not being marked as a top priority?
I donāt understand why this isnāt even on the roadmapā¦
Obsidian Roadmap - Obsidian
Does the developer team think this isnāt even worthy of a future agenda?
I just wanted to chime in with my support for this bug fix. To those who are asking why this isnāt a top priority, your concern was answered by @WhiteNoise earlier in this thread. I feel similarly that I really would like to have this fixed, but thereās a lot of work being done on LP, so itās understandable why this bug hasnāt already been fixed. Itās going to be folded into a larger release laterā¦ but I donāt understand why that LP overhaul isnāt on the roadmap. I understand that with the current business model, youāve got to make Synch a first-class citizen, and I assume that there are a lot of RTL users, but I hope the LP overhaul (or at least this bug fix) makes it to Planned some time soon. Itās frustrating af, and from the outside without access to the code, itās hard to understand why itās implemented in the reading view but not in LP.
As a few folks have mentioned, Markdown is all over the place (it feels about as chaotic as a pack of ADHD Hyenas)ā¦ so it doesnāt make fixing this easy. I really wish Asciidoc had support here. I love how it handles complex lists (see: Complex List Items | Asciidoctor Docs) and really hope that gets implemented someday rather than us having to jump through all the silly md-flavor hoops. Asciidoc has made this sort of stuff easy without all the bs bugginess of md flavors. I think there are a few FE for its implementation, like this one for an ASCIIDOC plugin. I just donāt understand why everyone makes their own flavor of md to address issues when thereās already a great flavor (ok, distant cousin) of md called Aciidoc that does all the things, is human-readable, and slick in implementation.
Similarly voicing that this is the single feature I would most want added to Obsidian, and the only thing pushing me to consider alternatives. My note-taking style has developed to use nested lists a lot, and Iām tired of avoiding code blocks in my lists.
I wish I could understand what you are doing to make this work.
when I type the
-
???, I never see the list items update. At that point they should be
-
ā¦
-
ā¦
code block -
ā¦
But, each of my list items start with 1 until the 4th item which is a 2.
I think if I could follow what you are doing for the work around, I could keep using this great editor. Any chance you could make a video clip?
If I understand you correctly, just hit backspace after the 2.
gets written where it should say 4.
Itās markdown so you can specifically change it to 4.
and it will continue automatically numbering from there