[MPLUGIN-98] Remove javadoc inline tags from output of help mojo

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@643559 13f79535-47bb-0310-9956-ffa450edef68
master
Benjamin Bentmann 2008-04-01 20:49:26 +00:00
parent 6ebf227d09
commit 0d658ca66e
2 changed files with 7 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import javax.swing.text.html.parser.ParserDelegator;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.Parameter;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.tools.plugin.util.PluginUtils;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
@ -524,7 +525,7 @@ public class PluginHelpGenerator
}
};
parser.parse( new StringReader( str ), htmlCallback, true );
parser.parse( new StringReader( PluginUtils.makeHtmlValid( str ) ), htmlCallback, true );
return StringUtils.replace( sb.toString(), "\"", "'" ); // for CDATA
}

View File

@ -39,5 +39,9 @@ public class PluginHelpGeneratorTest
// wrong HTML
javadoc = "Generates <i>something</i> <b> for the project.";
assertEquals( "Generates something for the project.", PluginHelpGenerator.toText( javadoc ) );
// javadoc inline tags
javadoc = "Generates {@code something} for the project.";
assertEquals( "Generates something for the project.", PluginHelpGenerator.toText( javadoc ) );
}
}
}