Using whitespace indentation to create new list levels
The following test examples are reorganized to build on observations from Christian (in this page) and Sean (in PITS 00722 referring to release notes for 2.1.0). Those release notes state, in relevant part:
Whitespace indentation rules now exist and are enabled by default. Any line that begins with whitespace and aligns with a previous list item is considered to be "within" that list item. Text folds and wraps as normal, and the directive is honored. To turn off whitespace indentation, use DisableMarkup('^ws');.
1. Normal bulleted list with multiple levels triggered by progressive markup
Release notes: "Any line that begins with whitespace and aligns with a previous list item is considered to be "within" that list item."
*One *\\
One space
**Two **\\
Two spaces
***Three ***\\
Three spaces
****Four ****\\
Four spaces
*****Five *****\\
Five spaces
One * One space
Two ** Two spaces
Three *** Three spaces
Four **** Four spaces
Five ***** Five spaces
3. Whitespace indentation taken one "step further"
Item markup ("*") following whitespce indentation is accepted and triggers a new level.
This one looks like it is misbehaving, or is it...? chr
*No Space
*One Space
*Two Space
*Three Space
*Four
No Space
One Space
Two Space
Three Space
Four
4. Whitespace indentation applied to various types of start of line markup
*Regular item (to set required reference)\\
Text with space
!Heading with space
----
>>apply=list blue font-style=italic bgcolor=#ffffcc<<
Style treated as literal
>><<
----
>>apply=list blue font-style=italicbgcolor=#ffffcc<<*Style applied (no whitespace) and list item added as reference
>><<
Text
(:attachlistext=mp3:)
Regular item (to set required reference) Text with space
Heading with space
>>apply=list blue font-style=italic bgcolor=#ffffcc<<
Style treated as literal
>><<
Style applied (no whitespace) and list item added as reference
>><<
Text
Podcast.mp3 Δ ... 11,380 bytes ... December 09, 2005, at 08:08 PM
C1. Christian's first variation
Breaking whitespace alignment by modifying the prior item causes item markup to be ignored.
*No Space
* One Space, but with a space between the '*' and the 'O'
*Two Space
*Three Space
*Four
No Space
One Space, but with a space between the '*' and the 'O'
*Two Space
*Three Space
*Four
I know what the problem is... not sure if it is a bug or a feature though... compare these two examples:
C2 Christian's next variation
* Item 1A
* Item 2A
* Item 1B
* Item 2B
Item 1A
Item 2A
Item 1B
* Item 2B
Notice how item 2A is a second level item while item 2B isn't. What is the difference? The answer
is actually quite simple. Item 2A is horizontally aligned under item 1A, while item 2B is not aligned under item 2A. This might actually be quite clever... right now I'm leaning towards this not being a bug, but an (unintended) feature. The behaviour might be considered a bug for enumerated lists though. chr
Original examples using ordered lists instead of bulleted lists
4. Ordered list with multiple levels triggered by progressive markup
#One #
##Two ##
###Three###
####Four ####
One #
Two ##
Three###
Four ####
5. Ordered list with multiple levels triggered by progressive spaces
#No Space
#One Space
#Two Space
#Three Space
#Four
No Space
One Space
Two Space
Three Space
Four
0: 00.00 00.00 config start
1: 00.05 00.01 config end
2: 00.64 00.21 MarkupToHTML begin
3: 00.64 00.22 MarkupToHTML begin
4: 00.66 00.22 MarkupToHTML end
5: 00.66 00.22 MarkupToHTML begin
6: 00.66 00.22 MarkupToHTML end
7: 00.66 00.22 MarkupToHTML begin
8: 00.66 00.22 MarkupToHTML end
9: 00.66 00.22 MarkupToHTML begin
10: 00.67 00.23 MarkupToHTML end
11: 00.67 00.23 MarkupToHTML begin
12: 00.68 00.23 MarkupToHTML end
13: 00.68 00.23 MarkupToHTML begin
14: 00.68 00.23 MarkupToHTML end
15: 00.68 00.23 MarkupToHTML begin
16: 00.68 00.23 MarkupToHTML end
17: 00.68 00.23 MarkupToHTML begin
18: 00.68 00.23 MarkupToHTML end
19: 00.71 00.24 MarkupToHTML end
20: 00.72 00.25 MarkupToHTML begin
21: 00.75 00.26 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
22: 00.77 00.26 ReadApprovedUrls SiteAdmin.ApprovedUrls end
23: 00.79 00.27 MarkupToHTML end
24: 00.79 00.27 MarkupToHTML begin
25: 00.80 00.27 MarkupToHTML end
26: 00.81 00.28 now