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
- I think this one behaves correctly chr
*One *
**Two **
***Three ***
****Four ****
*****Five ***** |
|
2. Whitespace indentation rule applied "as directed"
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 |
|
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 |
|
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=italic bgcolor=#ffffcc<<
*Style applied (no whitespace) and list item added as reference
>><<
Text
(:attachlist ext=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 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
|