[jboss-cvs] jboss-seam ...

Christian Bauer christian.bauer at jboss.com
Wed Feb 28 14:14:46 EST 2007


  User: cbauer  
  Date: 07/02/28 14:14:46

  Modified:    jboss-seam  seam-text.g
  Log:
  Make linking more flexible for wiki implementation
  
  Revision  Changes    Path
  1.30      +4 -8      jboss-seam/seam-text.g
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: seam-text.g
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-text.g,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- seam-text.g	2 Feb 2007 10:32:20 -0000	1.29
  +++ seam-text.g	28 Feb 2007 19:14:45 -0000	1.30
  @@ -49,13 +49,9 @@
           return result;
       }
       
  -    protected String linkUrl(String linkText) { return linkText.trim(); }
  -
  -    protected String linkDescription(String descriptionText, String linkText) { 
  -        return descriptionText.toString().trim().length()>0 ? descriptionText : linkText; 
  +    protected String linkTag(String description, String url) {
  +        return "<a href=\"" + url + "\" styleClass=\"seamTextLink\">" + description + "</a>";
       }
  -
  -    protected String linkClass(String linkText) { return "seamTextLink"; }
   }
   
   startRule: (newline)* ( (heading (newline)* )? text (heading (newline)* text)* )?
  @@ -124,7 +120,7 @@
         EQ GT 
         { beginCapture(); }
         attributeValue 
  -      { String link = endCapture(); append("<a href=\""); append( linkUrl(link) ); append("\" class=\""); append( linkClass(link) ); append("\">"); append( linkDescription(text, link) ); append("</a>"); }
  +      { String link = endCapture(); append(linkTag(text, link)); }
         CLOSE
       ;
       
  
  
  



More information about the jboss-cvs-commits mailing list