Top Description Methods
com.vladsch.flexmark.parser

public Interface LinkRefProcessorFactory

extends Function<Document, LinkRefProcessor>
Imports
com.vladsch.flexmark.util.ast.Document, com.vladsch.flexmark.util.data.DataHolder, org.jetbrains.annotations.NotNull, java.util.function.Function

Processing of elements which are based on a link ref: [] or ![] This includes footnote references [^...] and wiki links [[...]]

Method Summary

Modifier and TypeMethod and Description
public @NotNull LinkRefProcessor

Returns:

link ref processor
apply
(@NotNull Document
on which the processor will work
document
)

Redeclares java.util.function.Function.apply.

Create a link ref processor for the document

public int

Returns:

nesting level for references, >0 for nesting
getBracketNestingLevel
(@NotNull DataHolder
options
options
)

Whether the element consists of nested [] inside the link ref.

public boolean

Returns:

true if ! is part of the desired element, false otherwise
getWantExclamationPrefix
(@NotNull DataHolder
options
options
)

Whether the image ref is desired, if not then !

Inherited from java.util.function.Function:
andThencomposeidentity

Method Detail

applyback to summary
public @NotNull LinkRefProcessor apply(@NotNull Document document)

Redeclares java.util.function.Function.apply.

Create a link ref processor for the document

Parameters
document:@NotNull Document

on which the processor will work

Returns:@NotNull LinkRefProcessor

link ref processor

Annotations
@Override
@NotNull
getBracketNestingLevelback to summary
public int getBracketNestingLevel(@NotNull DataHolder options)

Whether the element consists of nested [] inside the link ref. For example Wiki link [[]] processor would return 1 Only immediately nested [] are considered. [[ ]] is nesting 1, [ [ ]] is not considered

When >0 then preview of next characters is used and if they will match then inner reference will not be created to allow outer one to match the desired element

Parameters
options:@NotNull DataHolder

options

Returns:int

nesting level for references, >0 for nesting

getWantExclamationPrefixback to summary
public boolean getWantExclamationPrefix(@NotNull DataHolder options)

Whether the image ref is desired, if not then ! will be stripped off the prefix and treated as plain text

Parameters
options:@NotNull DataHolder

options

Returns:boolean

true if ! is part of the desired element, false otherwise