I was trying to create an ordered list that has indentations and when I noticed that when I indent, the count doesn’t start over. And when I was done editing I noticed that the list didn’t have any indentations. It works with unordered lists, but how does this not work with ordered lists?
Also, for ordered lists, if one of the list’s text is long and wraps, the text on the new line doesn’t start at the same indentation level of the first line. It wraps underneath the number. But this works in unordered lists.
Yes we do support indented ordered lists, try and copy-paste the markdown below:
1. An item
1. A subitem
2. Another subitem
1. A fine detail about (b)
2. Another fine detail
2. Another item
1. Yet another subitem
2. You get it now, I imagine
1. A fine detail about (b)
2. Another fine detail
3. Final item
It should render as the following in display mode:
I see what you mean now, thanks for clarifying. You’re right this behaviour isn’t ideal with indentation as the number doesn’t reset to 1. causing it to break in display mode. I’ve made a note to fix / improve this behaviour in an upcoming minor release.
And with regards to wrapping, we’ve intentionally made the numbers in an ordered list be inline rather than maintaining an indentation level for the whole list item. The reason for this is that the numbers have variable widths compared to unordered lists. As well as allowing for a better viewing experience for lists with large numbers with our card format e.g. a list of years.
Good news! We’ve finally addressed this in Supernotes 3.1, so now ordered lists will be automatically re-numbered if you indent/outdent lines. It should also work if you move lines around using option + arrow keys.
Yeah, unfortunately it won’t do anything for cards you’ve already made, but if you try de-denting that “2.” line with shift+tab and then re-indenting it with tab, it should automatically renumber everything correctly, at which point it will render properly. And then for any composition you do in the future it should do the right thing the first time around, so you won’t have to do this dedent/redent dance.
Hmm. That’s strange. Do you remember the order you created this list in? In general, if you are in a list and indent it to make a sublist it should automatically re-number itself to start over from 1, so you shouldn’t really end up in the situation like the above under normal usage scenarios. But it’s entirely possible I’ve overlooked something so do let me know how if you can reproduce.
Ah yes, indeed. It looks like having the list item be the very last content in the card (with no more line breaks or whitespace or anything afterwards) is breaking the auto-list logic with the somewhat unfortunate side-effect of breaking editor focus as well. Whoops.
Thanks for helping me debug this everyone, will get it fixed in 3.1.2.
For me, indented items in numbered lists require 4 spaces of indentation, or they will be rendered as a top level item.
At the same time, bullet-point list items require only 2 leading items. On mobile, long-pressing the arrow button in the tool bar also adds 2 spaces. This makes me think this is actually a bug.
I have also noticed the 4 space requirement for nested indentation, and thought it might be a bug Is it intentional then? It’s not the end of the world, but kind of counter intuitive from my experience with other markdown editors
So we’ve come up with a potential solution to the indentation issue which we’d like to run by you and hear your thoughts on @fuzzy.beach, @isaiur, @freisatz and @marlonr.
Supporting three different types of indentation (2 spaces, 4 spaces and tabs) is prone to errors and also makes collaboration difficult, since one of you might prefer using 4 spaces and the other tabs.
Our proposed solution is that typing two spaces at the beginning of the line will automatically be replaced by a tab character. This means that you can either press space twice or tab, to indent a line (when at the start of the line). This will also make 4-spaces obsolete.
There may be some side effects where previous cards, might need to be adjusted if you edit them again, but we will try to minimise this. What do you think?