π Feature description:
I'd like to be able to determine, based on the nesting level of a list item, which formatting rule to use.
Currently I can sort-of do top-level and nested, which is enough for me to have something like:
1. top-level 1:
a. Some sub-level;
b. other sub-level;
c. a sub-level with children items:
a. Sub-sub-level item 1;
b. Another sub-sub-level item;
...
But with knowledge of which nesting level it's at, I could do something like:
1. top-level 1:
a. Some sub-level;
b. other sub-level;
c. a sub-level with children items:
i. Sub-sub-level item 1;
ii. Another sub-sub-level item;
...
π Possible solutions:
The item object could expose nesting_level as a 0..n number, with 0 functioning the same as today's item.__nested being false.
It'd solve the use-case by providing a function like:
marker_dot = {
text = function(_, item)
local nested_level = item.nested_level % 3
if nested_level == 1 then
return string.char(96 + item.n) .. "."
elseif nested_level == 2 then
-- some custom function to convert item.n to roman numerals
return to_roman_numerals(item.n) .. "."
end
return string.format("%d.", item.n)
end,
}
π§Ύ Feature reference:
Some apps including (but not limited to) notion do nesting like this and it's nice to be able to format this way so the document can reference in text the same thing as the visual of the lists show.
π Feature description:
I'd like to be able to determine, based on the nesting level of a list item, which formatting rule to use.
Currently I can sort-of do top-level and nested, which is enough for me to have something like:
But with knowledge of which nesting level it's at, I could do something like:
π Possible solutions:
The
itemobject could exposenesting_levelas a 0..n number, with0functioning the same as today'sitem.__nestedbeing false.It'd solve the use-case by providing a function like:
π§Ύ Feature reference:
Some apps including (but not limited to) notion do nesting like this and it's nice to be able to format this way so the document can reference in text the same thing as the visual of the lists show.