Nested Lists
Nested Lists
How deep can nested lists go ?
- 1
- 2
- 2.1
- 2.2
- 2.2.1
- 2.2.2
- 2.2.2.1
- 2.2.2.2
- 2.2.2.2.1
- 2.2.2.2.2
- 2.2.2.2.2.1
- 2.2.2.2.2.2
- 2.2.2.2.2.3
- 2.2.2.2.3
- 2.2.2.3
- 2.2.3
- 2.3
- 3
That didn’t quite work — it broke down at the 3rd level of nesting (2.2.1). In the source everything was lined up consistently.
- 1
- 2
- 2.1
- 2.2
- 2.2.1
- 2.2.2
- 2.2.2.1
- 2.2.2.2
- 2.2.2.2.1
- 2.2.2.2.2
- 2.2.2.2.2.1
- 2.2.2.2.2.2
- 2.2.2.2.2.3
- 2.2.2.2.3
- 2.2.2.3
- 2.2.3
- 2.3
- 3
Try adjusting spaces
- 1
- 2
- 2.1
- 2.2
- 2.2.1
- 2.2.2
- 2.2.2.1
- 2.2.2.2
- 2.2.2.2.1
- 2.2.2.2.2
- 2.2.2.2.2.1
- 2.2.2.2.2.2
- 2.2.2.2.2.3
- 2.2.2.2.3
- 2.2.2.3
- 2.2.3
- 2.3
- 3
Interesting — the nesting seemed to work, but at the 6th level the contents have fallen of the edge of the world.
The source for the above was:
- 1
- 2
- 2.1
- 2.2
- 2.2.1
- 2.2.2
- 2.2.2.1
- 2.2.2.2
- 2.2.2.2.1
- 2.2.2.2.2
- 2.2.2.2.2.1
- 2.2.2.2.2.2
- 2.2.2.2.2.3
- 2.2.2.2.3
- 2.2.2.3
- 2.2.3
- 2.3
- 3
So the pattern seems to be - for level 1, the ‘-’ is at
the leftmost column - for level 2, the ‘-’ is indented by
2 columns (that is — preceded by 2 spaces), so the
‘-’ lines up below the contents level 1 - for level 3, the
‘-’ needs an extra indentation of 3
columns, so the ‘-’ doesn’t line up below the
contents of level 2 - for level 4, the ‘-’ needs an
extra indentation of 4 columns, so the
‘-’ doesn’t line up below the contents of level 3
- for level 5, the ‘-’ needs an extra indentation
of 4 columns, … - for level 6, the ‘-’ needs an
extra indentation of 4 columns, but the contents fall
off the end of the world.
Thanks!
I’m pretty sure this is a bug in the Redcarpet library. I’ll try to find time to test it and report it, or feel free to report it yourself.
