1. Description

In a bulleted list, with indention level > 1, placing a block element between 2 list items causes the idention level of the 2nd list item to be displayed with the indention level 1 bullet.

1.1. Steps to reproduce

  1. Create a list of bulleted items where the idention level is greater than 1 (e.g., two spaces before * character).
  2. Place a multi-line block element between two of the list elements.
  3. Notice that the bullet of the list item following the block element is incorrectly shown as the indent level 1 bullet.

1.2. Example

Wiki code:

Test of list indention problem with blocks

 * Bullet indent level 1
  * Bullet indent level 2
{{{
  Sample code -- blah blah blah
}} -- brackets altered for code display

  * Should be at bullet indent level 2 -- but displayed as indent level 1 bullet

Displayed:

Test of list indention problem with blocks

  Sample code -- blah blah blah

1.3. Details

This Wiki. (I.e., replicated on the WikiSandBox for the MoinMoin Wiki.).

1.4. Workaround

 * Bullet indent level 1
## Braces placed at end of lines, instead of separate lines
  * Bullet indent level 2{{{
  Sample code -- blah blah blah}} -- brackets altered for code display
  * Should be at bullet indent level 2 -- but displayed as indent level 1 bullet

2. Discussion

Very similar to MoinMoinBugs/BlockElementsInList bug; and again, probably is an undefined situation.

However, I'd argue that this would be a fairly common situation -- a bulleted list with source code listed under individual items.

I think Reimar's workaround makes this significantly less serious (thanks Reimar!) - JeffMeyer 2005-03-16 21:11:35

This is not a bug. The example markup is wrong. The list should be finished when a new block element is found at the same level of the start of the list:

  1. This is a start of a list

This block element ends the list above
  1. This is another list

If one want to include a block element in a list, it must be a child of a list item:

  1. This is a start of a list
    • This block element is a child of item 1
  2. This is item 2

This markup also work for bulleted lists:

But it will not work for numbered lists:

  1. This is list 1 with one item
    This block element is list 2, because indent is implemented with list
    without a bullet.
  2. This is list 3 with one item

But this will work for numbered lists - this is actually Reimar workaround:

  1. This is item 1
  2. This block element is item 2
  3. This is item 3

One should not use lists to design a page as numbered indented paragraphs. Use lists for lists - one or two lines of text per item, and numbered headings for paragraphs.

2.1. Example usage

2.1.1. First paragraph

Some text...

And some code

2.1.2. Second paragraph

Some text...

And some code

3. Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/BlockElementsInListBreakIndent (last edited 2007-10-29 19:12:15 by localhost)