Hi xwikiers,
During the process of doing a 1.0 to 2.0 syntax converter I found some
bugs on XWiki 2.0 lists syntax/parser.
Let's list them:
a) The parser repeat list parameters on each sub list. See
http://jira.xwiki.org/jira/browse/XWIKI-3067 for details.
b) any parameter on a sub list break the list
c) IMO we should support mixed list syntax (see
http://markmail.org/message/a3bzyzxk4yxcwb7x), like in
1. item 1
** item 2
(% style="list-style-type: lower-alpha" %)
*** subitem 2.1
*** subitem 2.2
** item 3
1. item 4
d) we should support adding any parameter on list item. We dont have
any syntax for that.
For all this I propose the following:
1) A sub list inherits from its parent
1.a) Stop repeating parameters in parser
1.b) A sub list can add new parameters
1.c) A sub list can override a parameter
2) Add support for mixed list syntax. This is about "1." and "*", the
mixing of different "*" style is already covered by 1)
1.first level item
** second level item
** second level item
1. first level item
2.a) Remove the 1*. syntax support
3) Add support for list item (LI) parameters.
3.a) We will need a syntax for it. For now I propose: if this is not
the first item list or if there is two parameter token the second is
for the list item. This means you will need to explicitly add a empty
parameters token when you want to add parameters on an the item list.
(%%)
(% param=value %)
* first item
(% param2=value %)
* second item
1) +1
2) +1 because it's easier for user IMO and a lot more simple for
parser than having a specific syntax for mixing syntax like with
"1*.". Plus I voted for 1) and I don't like particular cases.
2.a) +1 for cleaner parser and syntax
3) +1, we need it since we generally allow custom parameters everywhere
Thanks,
--
Thomas Mortagne