laika.rewrite.link

Type members

Classlikes

An anonymous selector (usually matched by position).

An anonymous selector (usually matched by position).

case class ApiLinks(baseUri: String, packagePrefix: String, packageSummary: String)
Companion:
object
object ApiLinks
Companion:
class

An auto-number selector (usually matched by position).

An auto-number selector (usually matched by position).

An auto-symbol selector (usually matched by position).

An auto-symbol selector (usually matched by position).

case class DocumentTargets(document: Document, slugBuilder: String => String)

Collects all tree elements from a document that can be referenced from other elements, like images, footnotes, citations and other inline targets.

Collects all tree elements from a document that can be referenced from other elements, like images, footnotes, citations and other inline targets.

case class IconRegistry(icons: Map[String, Icon])

Registers Icon AST elements for use with the @:icon directive and the IconReference AST element.

Registers Icon AST elements for use with the @:icon directive and the IconReference AST element.

Companion:
object
Companion:
class
case class InvalidTarget(message: String) extends TargetValidation
case class LinkAliasResolver(sourceSelector: TargetIdSelector, targetSelector: TargetIdSelector, referenceResolver: LinkSource => Option[Span], formats: TargetFormats) extends TargetResolver
Companion:
object
Companion:
class
case class LinkConfig(targets: Seq[TargetDefinition], excludeFromValidation: Seq[Path], apiLinks: Seq[ApiLinks], sourceLinks: Seq[SourceLinks])
Companion:
object
object LinkConfig
Companion:
class
case class LinkDefinitionSelector(id: String) extends UniqueSelector

A selector for a definition for an internal or external link.

A selector for a definition for an internal or external link.

class LinkResolver(root: DocumentTreeRoot, slugBuilder: String => String) extends RewriteRulesBuilder

The default rewrite rules responsible for resolving link references that get applied to the raw document tree after parsing.

The default rewrite rules responsible for resolving link references that get applied to the raw document tree after parsing.

These rules resolve references to images, footnotes, citations and other inline targets, and generate the identifiers for targets with auto-generated ids like auto-number footnotes.

The rules replace references pointing to internal or external targets with the corresponding resolved link elements, as well as the targets themselves with nodes that contain their final ids.

In case of duplicate target ids or unresolvable references runtime messages get inserted into the final document tree.

case class LinkSource(span: Span, path: Path)

Represents the source of a link, its document path and the actual inline span that is representing the link.

Represents the source of a link, its document path and the actual inline span that is representing the link.

case class PathSelector(path: Path) extends UniqueSelector

A selector based on a path, optionally including a fragment component.

A selector based on a path, optionally including a fragment component.

case class RecoveredTarget(message: String, recoveredTarget: ResolvedInternalTarget) extends TargetValidation
sealed trait Selector

Represents a selector used for matching reference nodes to target nodes. The selectors often differ from both, the ids rendered in the final document and the ids used for display.

Represents a selector used for matching reference nodes to target nodes. The selectors often differ from both, the ids rendered in the final document and the ids used for display.

sealed trait SequenceSelector extends Selector

A selector that can be used for a sequence of targets.

A selector that can be used for a sequence of targets.

Default implementation for the logic that transforms section titles, document names and user-provided ids to a slug that is compatible with HTML/XML ids, URLs and file names.

Default implementation for the logic that transforms section titles, document names and user-provided ids to a slug that is compatible with HTML/XML ids, URLs and file names.

case class SourceLinks(baseUri: String, suffix: String, packagePrefix: String)
Companion:
object
Companion:
class
case class TargetDefinition(id: String, target: Target)
case class TargetIdSelector(id: String) extends UniqueSelector

A selector for a rendered target in a document.

A selector for a rendered target in a document.

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.

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
Companion:
class
case class TargetSequenceResolver(targets: Seq[TargetResolver], sel: Selector) extends TargetResolver

Represents a resolver for a sequence of targets where matching reference nodes get determined by position. The resolveReference and resolveTarget methods can be invoked as many times as this sequence contains elements.

Represents a resolver for a sequence of targets where matching reference nodes get determined by position. The resolveReference and resolveTarget methods can be invoked as many times as this sequence contains elements.

sealed trait TargetValidation
class TreeTargets(root: DocumentTreeRoot, slugBuilder: String => String)

Collects all elements from a document tree that can be referenced from other elements, like images, footnotes, citations and other inline targets.

Collects all elements from a document tree that can be referenced from other elements, like images, footnotes, citations and other inline targets.

sealed trait UniqueSelector extends Selector

A selector that can is a globally unique identifier.

A selector that can is a globally unique identifier.

case object ValidTarget extends TargetValidation