maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Siveton" <vincent.sive...@gmail.com>
Subject Re: svn commit: r598803 - in /maven/doxia/doxia/trunk: doxia-core/src/main/java/org/apache/maven/doxia/sink/ doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/ doxia-modules/doxia-module-fo/src/main/java/or
Date Wed, 28 Nov 2007 13:07:27 GMT
Hi Hervé,

2007/11/27, hboutemy@apache.org <hboutemy@apache.org>:
> Author: hboutemy
> Date: Tue Nov 27 15:02:47 2007
> New Revision: 598803
>
> URL: http://svn.apache.org/viewvc?rev=598803&view=rev
> Log:
> [DOXIA-189] removed newline added after anchor, link, bold, italic and monospaced tags
>
> Modified:
>     maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
>     maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
>     maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
>     maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
>     maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
>
> Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java?rev=598803&r1=598802&r2=598803&view=diff
> ==============================================================================
> --- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
(original)
> +++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
Tue Nov 27 15:02:47 2007
> @@ -166,9 +166,8 @@
>      }
>
>      /**
> -     * Ends a Tag. For instance:
> -     * <pre>
> -     * &lt;/tag&gt;
> +     * Ends a Tag followed by an EOL. For instance:
> +     * <pre>&lt;/tag&gt;
>       * </pre>
>       *
>       * @param t a tag
> @@ -188,6 +187,29 @@
>          sb.append( String.valueOf( GREATER_THAN ) );
>
>          sb.append( EOL );
> +
> +        write( sb.toString() );
> +    }
> +
> +    /**
> +     * Ends a Tag without an EOL. For instance:
> +     * <pre>&lt;/tag&gt;</pre>
> +     *
> +     * @param t a tag
> +     */
> +    protected void writeEndTagWithoutEOL( Tag t )
> +    {
> +        StringBuffer sb = new StringBuffer();
> +        sb.append( String.valueOf( LESS_THAN ) );
> +        sb.append( String.valueOf( SLASH ) );
> +
> +        if ( nameSpace != null )
> +        {
> +            sb.append( nameSpace ).append( ":" );
> +        }
> +
> +        sb.append( t.toString() );
> +        sb.append( String.valueOf( GREATER_THAN ) );
>
>          write( sb.toString() );
>      }
>

Instead of copy/past and to improve the maintenance, it could be better to have:
protected void writeEndTag( Tag t ){ writeEndTag( t, true ); }
protected void writeEndTag( Tag t, boolean withoutEOL ){...}
WDYT?

Cheers,

Vincent

[SNIP]

Mime
View raw message