Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8344 closed defect (worksforme)

Strange wiki formatting behavior

Reported by: ariel@… Owned by:
Priority: low Milestone:
Component: rendering Version: 0.11.4
Severity: minor Keywords: WikiFormatting, Lists needinfo
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

I have noticed some possibly inconsistent behavior with lists. Perhaps the following behavior is obvious to someone who really knows the Trac wiki formatting system, but it does not at all seem consistent to me.

The idea is to start a numbered list, interrupt it with an indented lettered list, and then resume the numbered list. Ideally, the word "Briefly" would be either at the default indentation (flush left) or in line with the numbers, and the small letters would be indented to just the next level of indentation.

Some things I tried:

Below are some things I have tried.

 1. Item 1
 1. Item 2 [[BR]]
 Briefly: (One space before "Briefly"
 a. little letter 1.  One space before little letters
 a. little letter 2.  And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented.  At least I hope that is the way it will show up.
 a. little letter 3
 3. Item 3
 3. Item 4

gives:

  1. Item 1
  2. Item 2
    Briefly: (One space before "Briefly"
  3. little letter 1. One space before little letters
  4. little letter 2. And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented. At least I hope that is the way it will show up.
  5. little letter 3
  6. Item 3
  7. Item 4

While

 1. Item 1
 1. Item 2 [[BR]]
 Briefly: (One space before "Briefly"
    a. little letter 1.  Four spaces before little letters
    a. little letter 2.  And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented.  At least I hope that is the way it will show up.
    a. little letter 3
 3. Item 3
 3. Item 4

gives:

  1. Item 1
  2. Item 2
    Briefly: (One space before "Briefly"
    1. little letter 1. Four spaces before little letters
    2. little letter 2. And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented. At least I hope that is the way it will show up.
    3. little letter 3
  3. Item 3
  4. Item 4

While,

 1. Item 1
 1. Item 2 [[BR]]
  Briefly: (Two spaces before "Briefly"
 a. little letter 1.  One space before little letters
 a. little letter 2.  And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented.  At least I hope that is the way it will show up.
 a. little letter 3
 3. Item 3
 3. Item 4

gives:

  1. Item 1
  2. Item 2
    Briefly: (Two spaces before "Briefly"
  3. little letter 1. One space before little letters
  4. little letter 2. And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented. At least I hope that is the way it will show up.
  5. little letter 3
  6. Item 3
  7. Item 4

while,

 1. Item 1
 1. Item 2 [[BR]]
Briefly: (No spaces before "Briefly"
 a. little letter 1.  One space before little letters
 a. little letter 2.  And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented.  At least I hope that is the way it will show up.
 a. little letter 3
 3. Item 3
 3. Item 4

gives:

  1. Item 1
  2. Item 2

Briefly: (No spaces before "Briefly"

  1. little letter 1. One space before little letters
  2. little letter 2. And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented. At least I hope that is the way it will show up.
  3. little letter 3
  4. Item 3
  5. Item 4

while,

 1. Item 1
 1. Item 2 [[BR]]
Briefly: (No spaces before "Briefly"
  a. little letter 1.  two space before little letters
  a. little letter 2.  And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented.  At least I hope that is the way it will show up.
  a. little letter 3
 3. Item 3
 3. Item 4

gives:

  1. Item 1
  2. Item 2

Briefly: (No spaces before "Briefly"

  1. little letter 1. two space before little letters
  2. little letter 2. And even if this is a paragraph that continues onto the next line it will still be indented and the next one will still be indented. At least I hope that is the way it will show up.
  3. little letter 3
  1. Item 3
  2. Item 4

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 15 years ago

Description: modified (diff)

(fixed the text to match the actual indentation level; hope you didn't intend it the reverse way round)

comment:2 by Christian Boos, 15 years ago

The rules are:

  1. when starting an item (numbered or not),
    1. you'll stay at the same depth if you keep the same indentation level as the previous item,
    2. you'll increase the depth if you indent,
    3. you'll decrease the depth if you "dedent"
  2. when writing some text on the next line after an item,
    1. you'll decrease the depth if you dedent relative to the start of the previous item
    2. you'll stay at the same depth if you don't indent more than what would trigger a blockquote (two characters past the end of the item starter),
    3. you'll increase the depth (and produce a blockquote) otherwise
  3. a newline will start a new paragraph and therefore terminate the current lists

It seems that all the examples you've given obey to those rules.

Your last example needs some more explanations:

Briefly: (No spaces before "Briefly"
  a. little letter 1. ...
  a. little letter 2. ...
  a. little letter 3
 3. Item 3

After the Briefly: (No spaces before "Briefly" line, you start a list at toplevel (a.) then you dedent. The depth then decreases to zero, and the (3.) will start a new toplevel list. I think that's a correct behavior.

This is not to say that everything works as it should:

  • there is at least one important issue with rule 2.1., in which the text doesn't get added to the proper list item of the previous depth but instead triggers the creation of a new item at that previous depth (see #4848 for details)
  • the list formatting don't always play well with the other markup (e.g. with tables #6482).
  • according to ticket:1936#comment:5, the rule 3. will eventually go away.

I hope these explanations clarify the behavior of lists. Maybe the documentation (WikiFormatting#Lists) should be improved, or do you suggest some changes?

comment:3 by Christian Boos, 15 years ago

Keywords: needinfo added

comment:4 by Christian Boos, 15 years ago

Resolution: worksforme
Status: newclosed

As there was no specific problem raised in this ticket and all the (other) problems mentioned in comment:2 have corresponding tickets, I'm closing this one as worksforme.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.