LinkDirectives

laika.api.bundle.LinkDirectives

The API for declaring directives that can be used in links.

Attributes

Source
directives.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait Directive

A directive that knows how to take a string identifier and turn it into a span link.

A directive that knows how to take a string identifier and turn it into a span link.

Attributes

Source
directives.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def create(directiveName: String)(f: (String, DocumentCursor) => SpanLink): Directive

Creates a new link directive with the specified name and implementation.

Creates a new link directive with the specified name and implementation.

The specified function receives the string used in the directive instance in text markup.

Attributes

Source
directives.scala
def eval(directiveName: String)(f: (String, DocumentCursor) => Either[String, SpanLink]): Directive

Creates a new link directive with the specified name and implementation.

Creates a new link directive with the specified name and implementation.

The specified function receives the string used in the directive instance in text markup. When the result of the function call is a Left, the directive will produce an invalid AST element with the string as the error message.

Attributes

Source
directives.scala