1 5 package org.exoplatform.services.grammar.wiki.impl; 6 7 12 public class TitleITokenHandler extends TokenHandler { 13 14 public Token handleToken(Token parent, Token token, ParsingContext context) { 15 token = context.nextToken(token) ; 16 context.out("<h1>") ; 17 while(token != null) { 18 if(token.type == Token.DEFAULT_TOKEN || token.group == Token.INLINE_TOKEN_GROUP) { 19 token = context.getTokenHandlerManager().handleToken(null, token, context) ; 20 } else { 21 break ; 22 } 23 } 24 context.out("</h1>") ; 25 return token ; 26 } 27 28 public String [] getHandleableTokenType() { 29 return new String []{Token.TITLE_1_TOKEN} ; 30 } 31 } | Popular Tags |