Package com.vladsch.flexmark.parser
Interface LinkRefProcessorFactory
-
- All Superinterfaces:
java.util.function.Function<Document,LinkRefProcessor>
- All Known Implementing Classes:
EnumeratedReferenceLinkRefProcessor.Factory
,FootnoteLinkRefProcessor.Factory
,WikiLinkLinkRefProcessor.Factory
,ZzzzzzLinkRefProcessor.Factory
public interface LinkRefProcessorFactory extends java.util.function.Function<Document,LinkRefProcessor>
Processing of elements which are based on a link ref: [] or ![] This includes footnote references [^...] and wiki links [[...]]
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LinkRefProcessor
apply(Document document)
Create a link ref processor for the documentint
getBracketNestingLevel(DataHolder options)
Whether the element consists of nested [] inside the link ref.boolean
getWantExclamationPrefix(DataHolder options)
Whether the image ref is desired, if not then ! will be stripped off the prefix and treated as plain text
-
-
-
Method Detail
-
getWantExclamationPrefix
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
- options- Returns:
- true if ! is part of the desired element, false otherwise
-
getBracketNestingLevel
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 consideredWhen
>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
- options- Returns:
- nesting level for references,
>0
for nesting
-
apply
@NotNull LinkRefProcessor apply(@NotNull Document document)
Create a link ref processor for the document- Specified by:
apply
in interfacejava.util.function.Function<Document,LinkRefProcessor>
- Parameters:
document
- on which the processor will work- Returns:
- link ref processor
-
-