blark.sphinxdomain.BlarkXRefRole

class blark.sphinxdomain.BlarkXRefRole(fix_parens: bool = False, lowercase: bool = False, nodeclass: type[Element] | None = None, innernodeclass: type[TextElement] | None = None, warn_dangling: bool = False)[source]

Bases: XRefRole

Methods

process_link(env, refnode, ...)

Called after parsing title and target text, and creating the reference node (given in refnode).

Attributes

config

Reference to the Config object.

env

Reference to the BuildEnvironment object.

explicit_title_re

has_explicit_title

A boolean indicates the role has explicit title or not.

disabled

A boolean indicates the reference is disabled.

title

The link title for the interpreted text.

target

The link target for the interpreted text.

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

inliner

The docutils.parsers.rst.states.Inliner object.

options

A dictionary of directive options for customisation (from the "role" directive).

content

A list of strings, the directive content for customisation (from the "role" directive).

Called after parsing title and target text, and creating the reference node (given in refnode). This method can alter the reference node and must return a new (or the same) (title, target) tuple.