Edgewall Software
Modify

Opened 18 years ago

Last modified 9 years ago

#4439 new defect

PageOutline macro produces empty <li> elements

Reported by: Florent Angebault <fangebault@…> Owned by:
Priority: low Milestone: topic-wikiengine
Component: wiki system Version: 0.10.3
Severity: minor Keywords: pageoutline
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When a level 3 section is immediately followed by a level 1 section, the macro generates an empty <li> element. It happens for every n+2 level section that is immediately followed by a n level section.

It doesn't shows up in normal circumstances because empty <li> elements are not displayed. But having customized the CSS to show section numbers in the TOC, those additional elements are displayed (at least with firefox or opera, but not IE).

How to reproduce the bug:

Modify the file templates/site_css.cs:

/* Auto-numbering TOC's elements */
.wiki-toc ol {counter-reset: toc;}
.wiki-toc ol li:before {
        list-style-type: decimal;
        list-style-position: inside;
        content: counters(toc, ".") " ";
        counter-increment: toc;
}

And the create a wiki page like this:

[[PageOutline()]]

= First section =

=== First subsection ===

== Second subsection ==

=== Sub-subsection ===

= Second Section =

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 18 years ago

Component: generalwiki
Keywords: pageoutline added
Milestone: 0.12
Owner: changed from Jonas Borgström to Christian Boos

I should port some of the stuff I did for the TH:TocMacro.

comment:2 by Christian Boos, 14 years ago

Milestone: next-major-0.1X0.13

comment:3 by Christian Boos, 14 years ago

Milestone: 0.130.14-wikiengine

comment:4 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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