maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r772599 - in /maven/doxia/doxia/trunk/doxia-core/src: main/java/org/apache/maven/doxia/macro/toc/TocMacro.java test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
Date Thu, 07 May 2009 10:44:43 GMT
Author: ltheussl
Date: Thu May  7 10:44:43 2009
New Revision: 772599

URL: http://svn.apache.org/viewvc?rev=772599&view=rev
Log:
[DOXIA-316] fix depth counting, restore backward compatibility with doxia 1.0

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java?rev=772599&r1=772598&r2=772599&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java
Thu May  7 10:44:43 2009
@@ -129,7 +129,7 @@
 
         if ( index.getChildEntries().size() > 0 )
         {
-            if ( ( fromDepth <= section ) || ( section == 0 ) )
+            if ( ( fromDepth < section ) || ( section == 0 ) )
             {
                 sink.list();
             }
@@ -141,12 +141,12 @@
                 IndexEntry sectionIndex = (IndexEntry) it.next();
                 if ( ( i == section ) || ( section == 0 ) )
                 {
-                    writeSubSectionN( sink, sectionIndex, 1 );
+                    writeSubSectionN( sink, sectionIndex, 0 );
                 }
                 i++;
             }
 
-            if ( ( fromDepth <= section ) || ( section == 0 ) )
+            if ( ( fromDepth < section ) || ( section == 0 ) )
             {
                 sink.list_();
             }

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java?rev=772599&r1=772598&r2=772599&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
Thu May  7 10:44:43 2009
@@ -107,8 +107,8 @@
         parser.setSecondParsing( true );
         macroParameters.put( "parser", parser );
         macroParameters.put( "section", "2" );
-        macroParameters.put( "fromDepth", "1" );
-        macroParameters.put( "toDepth", "2" );
+        macroParameters.put( "fromDepth", "0" );
+        macroParameters.put( "toDepth", "1" );
 
         sink.reset();
         request = new MacroRequest( macroParameters, basedir );



Mime
View raw message