TargetResolver

sealed abstract class TargetResolver(val selector: Selector, val targetFormats: TargetFormats, val precedence: Int)

Represents a resolver for a target that has its final identifier generated (if necessary) and can be used to resolve matching reference nodes.

Value parameters:
precedence

the precedence in comparison to other resolvers with the same selector

selector

the selector to use to identify reference nodes matching this target

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def replaceTarget(rewrittenOriginal: Element): Option[Element]

Creates the final target element (with its final, resolved identifiers).

Creates the final target element (with its final, resolved identifiers).

Value parameters:
rewrittenOriginal

the original target node in the raw document, potentially already rewritten in case any of its children got rewritten

def resolveReference(linkSource: LinkSource): Option[Span]

Creates the final link element for the specified reference pointing to this target. In case this target does not know how to resolve the element it should return None.

Creates the final link element for the specified reference pointing to this target. In case this target does not know how to resolve the element it should return None.

Value parameters:
linkSource

the source of the link

Concrete fields

val precedence: Int