You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/07/11 18:26:55 UTC

svn commit: r793195 - /incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java

Author: sabob
Date: Sat Jul 11 16:26:55 2009
New Revision: 793195

URL: http://svn.apache.org/viewvc?rev=793195&view=rev
Log:
render a space after numbers e.g. Type1Control becomes Type 1 Control

Modified:
    incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java

Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=793195&r1=793194&r2=793195&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Sat Jul 11 16:26:55 2009
@@ -2280,7 +2280,15 @@
                     if (Character.isLowerCase(aChar)
                         && (Character.isUpperCase(nextChar)
                             || Character.isDigit(nextChar))) {
-                       buffer.append(" ");
+
+                        // Add space before digits or uppercase letters
+                        buffer.append(" ");
+
+                    } else if (Character.isDigit(aChar)
+                        && (!Character.isDigit(nextChar))) {
+
+                        // Add space after digits
+                        buffer.append(" ");
                     }
                 }
             }