[jboss-cvs] jboss-seam ...

Christian Bauer christian.bauer at jboss.com
Fri Feb 2 05:32:20 EST 2007


  User: cbauer  
  Date: 07/02/02 05:32:20

  Modified:    jboss-seam  seam-text.g
  Log:
  Fixed quote, added style HTML attribute, made hyphen and semicolon usable again, added curly braces, sacrificed HTML entities
  
  Revision  Changes    Path
  1.29      +15 -32    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.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- seam-text.g	2 Feb 2007 07:49:34 -0000	1.28
  +++ seam-text.g	2 Feb 2007 10:32:20 -0000	1.29
  @@ -9,8 +9,8 @@
   	k=4;
   }
   {   
  -	private java.util.Set htmlElements = new java.util.HashSet( java.util.Arrays.asList( new String[] { "a", "p", "quote", "code", "pre", "table", "tr", "td", "th", "ul", "ol", "li", "b", "i", "u", "tt", "del", "em", "hr", "br", "div", "span", "h1", "h2", "h3", "h4", "img" } ) );
  -	private java.util.Set htmlAttributes = new java.util.HashSet( java.util.Arrays.asList( new String[] { "src", "href", "lang", "class", "id" } ) );
  +	private java.util.Set htmlElements = new java.util.HashSet( java.util.Arrays.asList( new String[] { "a", "p", "q", "code", "pre", "table", "tr", "td", "th", "ul", "ol", "li", "b", "i", "u", "tt", "del", "em", "hr", "br", "div", "span", "h1", "h2", "h3", "h4", "img" } ) );
  +	private java.util.Set htmlAttributes = new java.util.HashSet( java.util.Arrays.asList( new String[] { "src", "href", "lang", "class", "id", "style" } ) );
   	
       private StringBuilder mainBuilder = new StringBuilder();
       private StringBuilder builder = mainBuilder;
  @@ -76,7 +76,7 @@
   formatted: bold|underline|italic|monospace|superscript|deleted
       ;
   
  -plain: word|punctuation|escape|space|link|entity
  +plain: word|punctuation|escape|space|link
       ;
     
   word: w:WORD { append( w.getText() ); }
  @@ -93,14 +93,12 @@
           | sl:SLASH { append( sl.getText() ); } 
           | b:BAR { append( b.getText() ); } 
           | h:HAT { append( h.getText() ); }
  -        | m:MINUS { append( m.getText() ); } 
           | p:PLUS { append( p.getText() ); } 
           | eq:EQ { append( eq.getText() ); }
           | hh:HASH { append( hh.getText() ); }
           | e:ESCAPE { append( e.getText() ); }
           | t:TWIDDLE { append( t.getText() ); }
           | u:UNDERSCORE { append( u.getText() ); }
  -        | sc:SEMICOLON { append( sc.getText() ); }
       ;
       
   moreSpecialChars:
  @@ -119,12 +117,6 @@
       | AMPERSAND { append("&"); }
       ;
       
  -entity: AMPERSAND { append("&"); } 
  -        ( HASH { append("#"); } )? 
  -        word 
  -        SEMICOLON { append(";"); }
  -    ;
  -    
   link: OPEN 
         { beginCapture(); } 
         (plain)* 
  @@ -161,19 +153,19 @@
                HAT { append("</sup>"); }
       ;
       
  -deleted: MINUS { append("<del>"); }
  +deleted: TWIDDLE { append("<del>"); }
            (plain|bold|underline|italic|monospace|superscript|newline)+
  -         MINUS { append("</del>"); }
  +         TWIDDLE { append("</del>"); }
       ;
       
   preformatted: BACKTICK { append("<pre>"); }
  -              (word|punctuation|specialChars|moreSpecialChars|htmlSpecialChars|space|simpleNewline)*
  +              (word|punctuation|specialChars|moreSpecialChars|htmlSpecialChars|space|newline)*
                 BACKTICK { append("</pre>"); }
       ;
       
  -quoted: DOUBLEQUOTE { append("<quote>"); }
  +quoted: DOUBLEQUOTE { append("<q>"); }
           (plain|formatted|preformatted|html|(list newline)|newline)*
  -        DOUBLEQUOTE { append("</quote>"); }        
  +        DOUBLEQUOTE { append("</q>"); }
       ;
   
   heading: ( h1 | h2 | h3 | h4 ) newlineOrEof
  @@ -209,10 +201,7 @@
   space: s:SPACE { append( s.getText() ); }
       ;
       
  -simpleNewline: n:NEWLINE { append( n.getText() ); }
  -    ;
  -
  -newline: SEMICOLON { append("\n"); } | simpleNewline
  +newline: n:NEWLINE { append( n.getText() ); }
       ;
       
   newlineOrEof: newline | EOF
  @@ -266,7 +255,7 @@
         '\uf900'..'\ufaff')+
       ;
       
  -PUNCTUATION: ':' | '(' | ')' | '?' | '!' | '@' | '%' | '.' | ',' | '\''
  +PUNCTUATION: '-' | ';' | ':' | '(' | ')' | '{' | '}' | '?' | '!' | '@' | '%' | '.' | ',' | '\''
       ;
       
   EQ: '='
  @@ -290,9 +279,6 @@
   BAR: '|'
       ;
       
  -MINUS: '-'
  -    ;
  -    
   BACKTICK: '`'
       ;
       
  @@ -320,9 +306,6 @@
   LT: '<'
       ;
       
  -SEMICOLON: ';'
  -    ;
  -    
   AMPERSAND: '&'
       ;
       
  
  
  



More information about the jboss-cvs-commits mailing list