Abbreviation node not called when 2 abbreviations
*Created by: vmassol*
Hi, I'm now adding support for MD abbreviations.
I have added the AbbreviationExtension and registered a handler:
````
AbbreviationNodeVisitor abbreviationNodeVisitor = new AbbreviationNodeVisitor(this.visitor, this.listeners);
this.visitor.addHandlers(
new VisitHandler<>(Abbreviation.class, abbreviationNodeVisitor::visit)
);
````
And in my `visit` method:
````
public void visit(Abbreviation node)
{
// Since XWiki doesn't support abbreviations, we generate an HTML <abbr> element.
String html;
if (StringUtils.isNotEmpty(node.getAbbreviation())) {
html = String.format("<abbr title=\"%s\">%s</abbr>", node.getAbbreviation(),
String.valueOf(node.getChars()));
} else {
html = String.format("<abbr>%s</abbr>", String.valueOf(node.getChars()));
}
getListener().onRawText(html, Syntax.HTML_4_01);
}
````
The problem comes from the following input:
````
The HTML specification is maintained by the W3C.
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
````
In my case I get only 1 call for my `visit(Abbreviation node)`method instead of the 2 I was expecting.
In other words, I don't get a call for the `W3C`abbreviation.
Any idea?
Thanks again!
issue