tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r572402 - /tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java
Date Mon, 03 Sep 2007 19:20:57 GMT
Author: hlship
Date: Mon Sep  3 12:20:56 2007
New Revision: 572402

URL: http://svn.apache.org/viewvc?rev=572402&view=rev
Log:
TAPESTRY-1606: Anchor-Links in "Component Index" web page for T5 doesn't work with FireFox

Modified:
    tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java

Modified: tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java?rev=572402&r1=572401&r2=572402&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-component-report/src/main/java/org/apache/tapestry/mojo/ComponentReport.java
Mon Sep  3 12:20:56 2007
@@ -36,7 +36,6 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.AbstractMavenReport;
 import org.apache.maven.reporting.MavenReportException;
-import org.apache.tapestry.ioc.IOCUtilities;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.codehaus.doxia.sink.Sink;
 import org.codehaus.doxia.site.renderer.SiteRenderer;
@@ -147,10 +146,10 @@
 
             sink.listItem();
 
-            // Something is convertin the name attribute of the anchors to lower case, so
+            // Something is converting the name attribute of the anchors to lower case, so
             // we'll follow suit.
 
-            sink.link("#" + className.toLowerCase());
+            sink.link("#" + fixup(className));
             sink.text(simpleName);
             sink.link_();
 
@@ -166,6 +165,12 @@
 
     }
 
+    /** Convert to lower case, remove all period characters. */
+    private String fixup(String input)
+    {
+        return input.toLowerCase().replaceAll("\\.", "");
+    }
+
     private void writeClassDescription(Map<String, ClassDescription> descriptions,
Sink sink,
             String className)
     {
@@ -193,7 +198,7 @@
         sink.section2();
 
         sink.sectionTitle2();
-        sink.anchor(className);
+        sink.anchor(fixup(className));
         sink.text(className);
         sink.anchor_();
 
@@ -224,7 +229,7 @@
 
             for (String name : parents)
             {
-                sink.link("#" + name.toLowerCase());
+                sink.link("#" + fixup(name));
                 sink.text(name);
                 sink.link_();
 



Mime
View raw message