use of com.vladsch.flexmark.ext.wikilink.WikiNode in project flexmark-java by vsch.
the class WikiLinkLinkRefProcessor method updateNodeElements.
@Override
public void updateNodeElements(final Document document, final Node node) {
assert (node instanceof WikiNode);
final WikiNode wikiNode = (WikiNode) node;
if (node instanceof WikiLink && WikiLinkExtension.ALLOW_INLINES.getFrom(document)) {
// need to update link and pageRef with plain text versions
if (wikiNode.getText().isNull()) {
BasedSequence link = new TextCollectingVisitor().collectAndGetSequence(node);
wikiNode.setLink(link, WikiLinkExtension.ALLOW_ANCHORS.getFrom(document), WikiLinkExtension.ALLOW_ANCHOR_ESCAPE.getFrom(document));
}
}
}
Aggregations