Interface LinkResult
public interface LinkResult
What to do with a link/image processed by
LinkProcessor.-
Method Summary
Modifier and TypeMethodDescriptionIf aLinkInfo.marker()is present, include it in processing (i.e. treat it the same way as the brackets).static LinkResultnone()Link not handled by processor.static LinkResultreplaceWith(Node node, Position position) Replace the link with a node.static LinkResultwrapTextIn(Node node, Position position) Wrap the link text in a node.
-
Method Details
-
none
Link not handled by processor. -
wrapTextIn
Wrap the link text in a node. This is the normal behavior for links, e.g. for this:
The text is[my *text*](destination)my *text*, a text node and emphasis. The text is wrapped in aLinknode, which means the text is added as child nodes to it.- Parameters:
node- the node to which the link text nodes will be added as child nodesposition- the position to continue parsing from
-
replaceWith
Replace the link with a node. E.g. for this:
The processor could decide to create a[^foo]FootnoteReferencenode instead which replaces the link.- Parameters:
node- the node to replace the link withposition- the position to continue parsing from
-
includeMarker
LinkResult includeMarker()If aLinkInfo.marker()is present, include it in processing (i.e. treat it the same way as the brackets).
-