aTagNode.addAttribute("rel", "nofollow", true);
if (withoutSquareBrackets) {
aTagNode.addAttribute("class", "externallink", true);
aTagNode.addAttribute("title", link, true);
append(aTagNode);
aTagNode.addChild(new ContentToken(linkName));
} else {
String trimmedText = linkName.trim();
if (trimmedText.length() > 0) {
pushNode(aTagNode);
if (linkName.equals(link)) {
if (withoutSquareBrackets) {
aTagNode.addAttribute("class", "externallink", true);
aTagNode.addAttribute("title", link, true);
aTagNode.addChild(new ContentToken(trimmedText));
} else {
aTagNode.addAttribute("class", "external autonumber", true);
aTagNode.addChild(new ContentToken("["+(++fExternalLinksCounter)+"]"));
}
} else {
aTagNode.addAttribute("class", "externallink", true);
aTagNode.addAttribute("title", link, true);
WikipediaParser.parseRecursive(trimmedText, this, false, true);