pos = text.indexOf("]["); if (pos != -1) { title = text.substring(0, pos); link = text.substring(pos+2); }
Map<String,String> params = ctxt.token.parseParam(); link = params.get(PAGENAME); title = params.get(TEXT); if (title == null) title = link;
		public String apply(Context ctxt) throws ServiceException {			String text = ctxt.token.getValue();			String link = text;			String title = text;			int pos = text.indexOf('|');			if (pos != -1) {				link = text.substring(0, pos);				title = text.substring(pos+1);			} else {				pos = text.indexOf("][");				if (pos != -1) {					title = text.substring(0, pos);					link = text.substring(pos+2);				}			}			WikiUrl wurl = new WikiUrl(link, ctxt.item.getFolderId());			StringBuffer buf = new StringBuffer();			buf.append("<a href='");			if (wurl.isRemote())				buf.append(URL_PREFIX).append(wurl.getToken(1)).append('/').append(wurl.getToken(2));			else if (wurl.isAbsolute())				buf.append(URL_PREFIX).append(ctxt.item.getMailbox().getAccount().getUid()).append(wurl.getToken(1));			else				buf.append(link);			buf.append("'>").append(title).append("</a>");			return buf.toString();		}