Opened 15 years ago
Closed 15 years ago
#8344 closed defect (worksforme)
Strange wiki formatting behavior
Reported by: | 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 )
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:
- Item 1
- Item 2
Briefly: (One space before "Briefly" - little letter 1. One space before little letters
- 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.
- little letter 3
- Item 3
- 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:
- Item 1
- Item 2
Briefly: (One space before "Briefly"- little letter 1. Four spaces before little letters
- 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.
- little letter 3
- Item 3
- 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:
- Item 1
- Item 2
Briefly: (Two spaces before "Briefly" - little letter 1. One space before little letters
- 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.
- little letter 3
- Item 3
- 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:
- Item 1
- Item 2
Briefly: (No spaces before "Briefly"
- little letter 1. One space before little letters
- 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.
- little letter 3
- Item 3
- 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:
- Item 1
- Item 2
Briefly: (No spaces before "Briefly"
- little letter 1. two space before little letters
- 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.
- little letter 3
- Item 3
- Item 4
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
Description: | modified (diff) |
---|
comment:2 by , 15 years ago
The rules are:
- when starting an item (numbered or not),
- you'll stay at the same depth if you keep the same indentation level as the previous item,
- you'll increase the depth if you indent,
- you'll decrease the depth if you "dedent"
- when writing some text on the next line after an item,
- you'll decrease the depth if you dedent relative to the start of the previous item
- 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),
- you'll increase the depth (and produce a blockquote) otherwise
- 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 , 15 years ago
Keywords: | needinfo added |
---|
comment:4 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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.
(fixed the text to match the actual indentation level; hope you didn't intend it the reverse way round)