maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r657566 - /maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
Date Sun, 18 May 2008 14:27:38 GMT
Author: bentmann
Date: Sun May 18 07:27:37 2008
New Revision: 657566

URL: http://svn.apache.org/viewvc?rev=657566&view=rev
Log:
[MPLUGIN-116] Improve XHTML compliance

Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java

Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java?rev=657566&r1=657565&r2=657566&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
Sun May 18 07:27:37 2008
@@ -172,18 +172,17 @@
         w.writeMarkup( "<strong>"+ getBundle( locale ).getString( "pluginxdoc.description"
) + "</strong>:" );
         w.endElement(); //p
 
-        w.startElement( "p" );
         if ( StringUtils.isNotEmpty( mojoDescriptor.getDescription() ) )
         {
             w.writeMarkup( PluginUtils.makeHtmlValid( mojoDescriptor.getDescription() ) );
         }
         else
         {
+            w.startElement( "p" );
             w.writeText( getBundle( locale ).getString( "pluginxdoc.nodescription" ) );
+            w.endElement(); // p
         }
 
-        w.endElement(); // p
-
         writeGoalAttributes( mojoDescriptor, w );
 
         writeGoalParameterTable( mojoDescriptor, w );
@@ -375,18 +374,16 @@
             w.writeMarkup( "<strong><a name=\"" + parameter.getName() + "\">"
+ parameter.getName() + "</a>:</strong>" );
             w.endElement(); //p
 
-            String description = parameter.getDescription();
-            if ( StringUtils.isEmpty( description ) )
+            if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
             {
-                description = getBundle( locale ).getString( "pluginxdoc.nodescription" );
+                w.writeMarkup( PluginUtils.makeHtmlValid( parameter.getDescription() ) );
             }
             else
             {
-                description = PluginUtils.makeHtmlValid( description );
+                w.startElement( "p" );
+                w.writeMarkup( getBundle( locale ).getString( "pluginxdoc.nodescription"
) );
+                w.endElement(); // p
             }
-            w.startElement( "p" );
-            w.writeMarkup( description );
-            w.endElement(); //p
 
             w.startElement( "ul" );
 



Mime
View raw message