Open diunko opened 11 years ago
It seems that these two cases cover all useful blocks-inside-lists combinations.
To enable highlighting of list items' headers, let's allow headers inside list items (which are perfectly valid and commonly found in the wild).
To enable the second case, we have to allow empty lines not to break lists. The good question is, how do we terminate lists then?
I have some work in progress on these, which will land here as soon as we agree on acceptable blocks behavior.
@veged Need your opinion
Initially I don't aim to be able use any block-level elements inside of listItem except sublists. The biggest problem is extensions, which must allow any text-based format inside %%
and it's contrary to need for indentation all new lines inside of listItem.
But now, I think we can require to indent content of extensions for constant count of spaces for correct listItem indentation and automatically exclude this indent from text that passed to extension handler.
So we be able to make block level elements inside of listItem. But I'm still not sure about headers -- I think it's not so normal to put headers inside of lists (in semantic terms). Although we can just support this possibility.
Fine, I think I'll just put it here quite soon and we all see what happens then.
Should we close it or fix and merge?
Fix, definitely. Why not?
With a bit of thought, how should blocks inside lists behave?
Let us consider two simple cases of listItem content:
listItem translates to a simple
<li>something</li>
.or this:
First inline content gets wrapped into
para
, forming first block, and with all other blocks forms a list of children of listItem:so the second case is effectively a list of block-level elements inside a listItem.