ContextReference

laika.ast.ContextReference
abstract class ContextReference[T <: Span](ref: Key, source: SourceFragment) extends SpanResolver

Represents a reference to a value from the context of the current document. The ref attribute is a simple path expression in dot notation for accessing properties of an object (or keys of a Map).

The root elements accessible to such a reference are:

  • document: the current document with all of its public properties
  • parent: the parent tree of the current document
  • root: the root tree
  • config: all configuration values for the current document, including those inherited from parent trees

Attributes

Graph
Supertypes
trait Span
class Element
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Inherited types

type Self <: Span

Attributes

Inherited from:
Span

Value members

Concrete methods

protected def invalid(cError: ConfigError): InvalidSpan
protected def invalidType(value: ConfigValue): InvalidSpan
protected def missing: InvalidSpan

Inherited methods

def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def hasId: Boolean

Indicates whether this element has an id assigned.

Indicates whether this element has an id assigned.

Attributes

Inherited from:
Element
def hasStyle(name: String): Boolean

Indicates whether this element has the specified style assigned.

Indicates whether this element has the specified style assigned.

Attributes

Inherited from:
Element

Returns a new instance of this element with its options merged with the specified options.

Returns a new instance of this element with its options merged with the specified options.

Attributes

Inherited from:
Element

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Attributes

Inherited from:
Element

Attributes

Inherited from:
Element
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product
def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product

Attributes

Inherited from:
SpanResolver
def runsIn(phase: RewritePhase): Boolean

Attributes

Inherited from:
SpanResolver
def unresolvedMessage: String

An error message to display when this element remains unresolved until after the final AST transformation step.

An error message to display when this element remains unresolved until after the final AST transformation step.

Attributes

Inherited from:
Unresolved
def withId(id: String): Self

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Attributes

Inherited from:
Element
def withOptions(options: Options): Self

Returns a new instance of this element with the specified options replacing the current value.

Returns a new instance of this element with the specified options replacing the current value.

Attributes

Inherited from:
Element
def withStyle(name: String): Self

Returns a new instance of this element with the specified style added to its existing styles.

Returns a new instance of this element with the specified style added to its existing styles.

Attributes

Inherited from:
Element
def withStyles(styles: Iterable[String]): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Attributes

Inherited from:
Element
def withStyles(style: String, styles: String*): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Attributes

Inherited from:
Element

Returns a new instance of this element without its id.

Returns a new instance of this element without its id.

Attributes

Inherited from:
Element