maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trygve Laugstøl <tryg...@apache.org>
Subject Re: svn commit: r426246 - in /maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module: xdoc/XdocSink.java xhtml/XhtmlSink.java
Date Thu, 27 Jul 2006 21:25:11 GMT
vsiveton@apache.org wrote:
> Author: vsiveton
> Date: Thu Jul 27 14:18:11 2006
> New Revision: 426246
> 
> URL: http://svn.apache.org/viewvc?rev=426246&view=rev
> Log:
> MSITE-153: Paragraphs after list being "dropped" by site generation
> 
> o decremented the itemFlag in the sinks
> o formatted the code and clean import
> 
> Modified:
>     maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
>     maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
> 
> Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
> URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java?rev=426246&r1=426245&r2=426246&view=diff
> ==============================================================================
> --- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
(original)
> +++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
Thu Jul 27 14:18:11 2006
> @@ -16,14 +16,12 @@
>   * limitations under the License.
>   */
>  
> +import java.io.Writer;
> +
>  import org.apache.maven.doxia.module.HtmlTools;
>  import org.apache.maven.doxia.module.apt.AptParser;
>  import org.apache.maven.doxia.sink.SinkAdapter;
> -import org.apache.maven.doxia.sink.StructureSink;
>  import org.apache.maven.doxia.util.LineBreaker;
> -import org.codehaus.plexus.util.StringUtils;
> -
> -import java.io.Writer;
>  
>  /**
>   * A doxia Sink which produces an xdoc model.
> @@ -304,11 +302,11 @@
>      {
>          markup( "<li>" );
>          itemFlag++;
> -        // What follows is at least a paragraph.
>      }
>  
>      public void listItem_()
>      {
> +        itemFlag--;
>          markup( "</li>" + EOL );
>      }
>  
> @@ -345,11 +343,11 @@
>      {
>          markup( "<li>" );
>          itemFlag++;
> -        // What follows is at least a paragraph.
>      }
>  
>      public void numberedListItem_()
>      {
> +        itemFlag--;
>          markup( "</li>" + EOL );
>      }
>  
> @@ -377,11 +375,11 @@
>      {
>          markup( "<dd>" );
>          itemFlag++;
> -        // What follows is at least a paragraph.
>      }
>  
>      public void definition_()
>      {
> +        itemFlag--;
>          markup( "</dd>" + EOL );
>      }
>  
> @@ -402,8 +400,11 @@
>          else
>          {
>              itemFlag--;
> +            if ( itemFlag < 0 )
> +            {
> +                itemFlag = 0;
> +            }

I think a RuntimeException should be throwed here, this will most likely 
only mask hard to find bugs.

[snip]

--
Trygve

Mime
View raw message