code: private String parseLink(final String link) {
  		String[] tokens = link.substring(7, link.length() - 1).split("\\s");
  		if (tokens.length == 1) {
  			return tokens[0];
  		}
  		StringBuilder result = new StringBuilder();
  
  		boolean parametersSeen = false;
  		boolean inParameters = false;
  
  		for (int index = 0; index < tokens.length; index++) {
  			result.append(" ").append(tokens[index]);
  			if (tokens[index].indexOf('(') != -1 && !parametersSeen) {
  				inParameters = true;
  			}
  			if (index == 1 && !inParameters) {
  				result = new StringBuilder(tokens[index]);
  			}
  			if (tokens[index].indexOf(')') != -1 && !parametersSeen) {
  				parametersSeen = true;
  				if (index != tokens.length - 1) {
  					result = new StringBuilder();
  				}
  
  			}
  
  		}
  
  		return result.toString().trim();
  	}
docs: a helper method to process the links as they are found.
  
  @param link the string representing the original link.
  @return a new string to replace the old link.