Maven Doxia

Backward issue: wrong section counting in TOC macro

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1.1
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    0

Description

It seems that the definition of "depth" has changed in the TOC macro. For the following apt source:

%{toc|section=1|fromDepth=1|toDepth=1}

Section
* Sub-section 1
* Sub-section 2

Doxia 1.0 puts the list of sub-sections into the toc, Doxia 1.1 only the section.

Issue Links

Activity

Hide
Lukas Theussl added a comment -

Fixed in r772599.

Show
Lukas Theussl added a comment - Fixed in r772599.
Hide
Lukas Theussl added a comment -

Re-opening as this should really be counted as a bug in Doxia 1.0 and not a regression IMO. The problem is actually with the section counting, not the depth. Eg site-plugin-2.0 generates two different tocs for the following:

%{toc|section=1|fromDepth=1|toDepth=1}
%{toc|section=2|fromDepth=1|toDepth=1}

Section 1

* Sub-section 1.1
* Sub-section 1.2

Section 2

* Sub-section 2.1
* Sub-section 2.2

The toc for section 1 contains the two sub-sections, while the one for section 2 contains only the section.

Now I think that the current behavior of doxia 1.1 is correct, and consistent with the docs, but the problem is backward compatibility. All pages that contain a toc for a first section will be broken. So the question is: to fix or not to fix?

Show
Lukas Theussl added a comment - Re-opening as this should really be counted as a bug in Doxia 1.0 and not a regression IMO. The problem is actually with the section counting, not the depth. Eg site-plugin-2.0 generates two different tocs for the following:
%{toc|section=1|fromDepth=1|toDepth=1}
%{toc|section=2|fromDepth=1|toDepth=1}

Section 1

* Sub-section 1.1
* Sub-section 1.2

Section 2

* Sub-section 2.1
* Sub-section 2.2
The toc for section 1 contains the two sub-sections, while the one for section 2 contains only the section. Now I think that the current behavior of doxia 1.1 is correct, and consistent with the docs, but the problem is backward compatibility. All pages that contain a toc for a first section will be broken. So the question is: to fix or not to fix?
Hide
Lukas Theussl added a comment -

Fixed. Depth=1 is section, depth=2 is sub-section, etc, as documented.

Show
Lukas Theussl added a comment - Fixed. Depth=1 is section, depth=2 is sub-section, etc, as documented.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: