Bug: Bullets incorrect with gaps
Bullets are not correct when you try to have a single line space between doubly indented bullets
Test case
First situation has single-spaced bulleted lists
- Line 1: This is a single indented bullet
- Line 2: This is a doubly indented bullet
- Line 3: This is a doubly indented bullet
These work OK. However, if you add a blank line between the lines, you get poor results
- Line 1: This is a single indented bullet
-
- Line 2: This is a doubly indented bullet
-
- Line 3: This is a doubly indented bullet
In IE6, you get TWO LINES between each of the doubly indents. In Mozilla, you get an extra bullet dot for each doubly indented line.
Here is the code generated:
<ul>
<li> Line 1: This is a single indented bullet
</li>
</ul>
<p />
<ul>
<li>
<ul>
<li> Line 2: This is a doubly indented bullet
</li>
</ul>
</li>
</ul>
<p />
<ul>
<li>
<ul>
<li> Line 3: This is a doubly indented bullet
</li>
</ul>
</li>
</ul>
|
This code works right:
<ul>
<li> Line 1: This is a single indented bullet
</li>
</ul>
<p />
<ul>
<ul>
<li> Line 2: This is a doubly indented bullet
</li>
</ul>
</ul>
<p />
<ul>
<ul>
<li> Line 3: This is a doubly indented bullet
</li>
</ul>
</ul>
|
Like This:
- Line 1: This is a single indented bullet
- Line 2: This is a doubly indented bullet
- Line 3: This is a doubly indented bullet
In other words, you don't need to have the extra <li> if you are doing a doubly indented bullet without any singly indented bullet before it.
Environment
--
RaymondLutz - 21 Nov 2003
Follow up
Hmmmm. The defintion of TWiki ML is pretty clear - by example - that a blank line in the middle of a list means the end of the list. Opening a new list on the next line will indeed result in a double bullet. Personally I think this is probably correct behaviour, so I'm rejecting this as a bug - 14 months to the day after it was reported
--
CrawfordCurrie - 21 Feb 2005
Agreed, this is described as spec.
--
PeterThoeny - 01 Mar 2005
I was about to file this bug report myself. Let's re-open the discussion, shall we?
Bullet lists are much easier to read with intervening white space.
The behaviour (dueling bullets) violates the Principle of Least Surprise. If the behaviour meets the spec, then the spec, also, violates the Principle of Least Surprise. I recommend first changing the spec, then fixing the bug.
--
VickiBrown - 08 Mar 2005
Heh - I love the phrase "duelling bullets". Agreed, I have never liked this "feature". Changing the spec gets my support.
--
CrawfordCurrie - 09 Mar 2005
While I agree that asthetically that the "duelling bullets" isn't nice, the
HTML shown that produces the results you want won't validate. According to the
HTML standards, a list within a list (as opposed to a list within a list item) is a violation of the standard. Feel free to check, I'd love to be proven wrong, but I suspected this was the case when I was bringing myself up to date to the 4.X standards, and so tested it using the
W3C validator just a month or two ago. I don't know of any browser that won't handle lists in lists, and in fact,
HtmlAreaEditor spits out
HTML that looks like that, but I'd still rather find a way around this that does validate.
-
EricSchwertfeger - 09 Mar 2005
It it should be possible to define a
twikiEmptyBullet CSS class that can be used with the intermediate LI that serves the purpose thus (view raw to see the implementation) but still validates:
- Line 1: This is a single indented bullet
-
- Line 2: This is a doubly indented bullet
-
- Line 3: This is a doubly indented bullet
OL's are still a bit unintuitive:
- Line 1: This is a single indented
-
- Line 2: This is a doubly indented
-
- Line 3: This is a doubly indented
--
CrawfordCurrie - 10 Mar 2005
Which problem are we addressing, the duelling bullets, or ability to put vertical blank space in a list? Serious question, as they're overlapping problems and I don't think we'll find a single solution that optimally fixes both. The vertical spacing could be achieved without messing up ordered lists by giving the list item bottom padding, but that would involve twiki knowing that the two lists are actually part of one list, which means we'd either need a way to say "I want space between these two list items (or every list item in this list)" or a different way of saying "this ends the current list, and we're starting a new list." This would handle ordered lists, at the cost of complicating doing unordered lists, unless we use both solutions.
The twikiEmptyBullet class is a good way of dealing with the case of multiple bullets on the same line, so I'd like to see that change, even if we decide on some other way to put blank vertical space inside lists.
--
EricSchwertfeger - 10 Mar 2005
I don't think it would be hard to handle vertical space in lists differently. ATM the spec is:
list ::= bullet-line "\n" list-continuation | bullet-line ;
list-continuation ::= spaces arbitrary-text "\n" | bullet-line ;
bullet-line ::= spaces bullet arbitrary-text "\n" ;
spaces ::= (\s{3}|\t)+ ;
change this so that
list-continuation ::= spaces arbitrary-text "\n" | bullet-line | "\n" ;
A blank line in the list would be handled by adjusting the style of the subsequent LI i.e. <LI style="padding-top: 1ex"> or using a class.
- Line 1: First line
- Line 2: Line with a blank line before
- Line 3: Third line with no blank before
However this is all academic unless you can get
PeterThoeny to agree to a spec change.
--
CrawfordCurrie - 11 Mar 2005
Agreed. For some reason I was stuck on the issue of having two lists of the same type with nothing between them but empty space, and this would run them together. I'm not sure this is really an issue now that I've thought out my objection. I don't think I've ever seen two lists without any intervening explanation. If all else fails, how hard would it be to say that two blank lines ends a list? Also true on getting
PeterThoeny to agree.
--
EricSchwertfeger - 11 Mar 2005
Fix record