maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r599204 - in /maven/doxia/doxia/branches/doxia-1.0-alpha-x: 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-late...
Date Wed, 28 Nov 2007 23:49:37 GMT
Author: hboutemy
Date: Wed Nov 28 15:49:33 2007
New Revision: 599204

URL: http://svn.apache.org/viewvc?rev=599204&view=rev
Log:
[DOXIA-189] removed newline added after anchor, link, bold, italic and monospaced tags

Modified:
    maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
    maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
    maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
    maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
    maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java

Modified: maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java?rev=599204&r1=599203&r2=599204&view=diff
==============================================================================
--- maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
(original)
+++ maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
Wed Nov 28 15:49:33 2007
@@ -85,7 +85,7 @@
         }
 
         StringBuffer sb = new StringBuffer();
-        sb.append( String.valueOf( LESS_THAN ) );
+        sb.append( LESS_THAN );
         sb.append( t.toString() );
 
         if ( att != null )
@@ -103,18 +103,18 @@
                 }
                 else
                 {
-                    sb.append( String.valueOf( SPACE ) ).append( key.toString() ).append(
String.valueOf( EQUAL ) )
-                        .append( String.valueOf( QUOTE ) ).append( value.toString() ).append(
String.valueOf( QUOTE ) );
+                    sb.append( SPACE ).append( key.toString() ).append( EQUAL )
+                        .append( QUOTE ).append( value.toString() ).append( QUOTE );
                 }
             }
         }
 
         if ( isSimpleTag )
         {
-            sb.append( String.valueOf( SPACE ) ).append( String.valueOf( SLASH ) );
+            sb.append( SPACE ).append( SLASH );
         }
 
-        sb.append( String.valueOf( GREATER_THAN ) );
+        sb.append( GREATER_THAN );
 
         if ( isSimpleTag )
         {
@@ -125,22 +125,31 @@
     }
 
     /**
-     * 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
      */
     protected void writeEndTag( Tag t )
     {
+        writeEndTagWithoutEOL( t );
+        write( EOL );
+    }
+
+    /**
+     * 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 ) );
+        sb.append( LESS_THAN );
+        sb.append( SLASH );
         sb.append( t.toString() );
-        sb.append( String.valueOf( GREATER_THAN ) );
-
-        sb.append( EOL );
+        sb.append( GREATER_THAN );
 
         write( sb.toString() );
     }

Modified: maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java?rev=599204&r1=599203&r2=599204&view=diff
==============================================================================
--- maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
(original)
+++ maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
Wed Nov 28 15:49:33 2007
@@ -1377,7 +1377,7 @@
         {
             if ( !xmlMode )
             {
-                writeEndTag( ANCHOR_TAG );
+                writeEndTagWithoutEOL( ANCHOR_TAG );
             }
         }
     }
@@ -1418,12 +1418,12 @@
     {
         if ( externalLinkFlag )
         {
-            writeEndTag( ULINK_TAG );
+            writeEndTagWithoutEOL( ULINK_TAG );
             externalLinkFlag = false;
         }
         else
         {
-            writeEndTag( LINK_TAG );
+            writeEndTagWithoutEOL( LINK_TAG );
         }
     }
 

Modified: maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java?rev=599204&r1=599203&r2=599204&view=diff
==============================================================================
--- maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
(original)
+++ maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
Wed Nov 28 15:49:33 2007
@@ -142,7 +142,7 @@
     protected String getTableBlock( String cell, String caption )
     {
         // TODO: something's wrong
-        return "\\begin{ptable}\\begin{ptablerows}{c}\\begin{pcell}{c}cell\\end{pcell}\\\\\\end{ptablerows}\\ptablecaption{Table
caption}\\end{ptable}";
+        return "\\begin{ptable}\\begin{ptablerows}{c}\\begin{pcell}{c}cell\\end{pcell}\\\\\\end{ptablerows}\\ptablecaption{"
+ caption + "}\\end{ptable}";
     }
 
     /** {@inheritDoc} */

Modified: maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java?rev=599204&r1=599203&r2=599204&view=diff
==============================================================================
--- maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
(original)
+++ maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
Wed Nov 28 15:49:33 2007
@@ -881,7 +881,7 @@
     {
         if ( !headFlag && !titleFlag )
         {
-            writeEndTag( Tag.A );
+            writeEndTagWithoutEOL( Tag.A );
         }
     }
 
@@ -908,7 +908,7 @@
     {
         if ( !headFlag && !titleFlag )
         {
-            writeEndTag( Tag.A );
+            writeEndTagWithoutEOL( Tag.A );
         }
     }
 
@@ -932,7 +932,7 @@
     {
         if ( !headFlag && !titleFlag )
         {
-            writeEndTag( Tag.I );
+            writeEndTagWithoutEOL( Tag.I );
         }
     }
 
@@ -956,7 +956,7 @@
     {
         if ( !headFlag && !titleFlag )
         {
-            writeEndTag( Tag.B );
+            writeEndTagWithoutEOL( Tag.B );
         }
     }
 
@@ -980,7 +980,7 @@
     {
         if ( !headFlag && !titleFlag )
         {
-            writeEndTag( Tag.TT );
+            writeEndTagWithoutEOL( Tag.TT );
         }
     }
 

Modified: maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java?rev=599204&r1=599203&r2=599204&view=diff
==============================================================================
--- maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java
(original)
+++ maven/doxia/doxia/branches/doxia-1.0-alpha-x/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java
Wed Nov 28 15:49:33 2007
@@ -32,7 +32,7 @@
  * @author juan <a href="mailto:james@jamestaylor.org">James Taylor</a>
  * @author Juan F. Codagnone  (replaced println with XmlWriterXdocSink)
  * @version $Id$
- * @componentx
+ * @component
  */
 public class XmlWriterXdocSink
     extends SinkAdapter



Mime
View raw message