7.3.2.2.3. DispatcherSphinxDirective¶
- class DispatcherSphinxDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Methods
add_name
Append self.options['name'] to node['names'] if it exists.
assert_has_content
Throw an ERROR-level DirectiveError if the directive doesn't have contents.
debug
directive_error
Return a DirectiveError suitable for being thrown as an exception.
error
get_location
Get current location info for logging.
get_source_info
Get source and line number.
info
run
set_source_info
Set source and line number to the node.
severe
warning
- __init__(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Attributes
config
Reference to the
Config
object.env
Reference to the
BuildEnvironment
object.final_argument_whitespace
May the final argument contain whitespace?
has_content
May the directive have content?
img_opt
Mapping of option names to validator functions.
optional_arguments
Number of optional arguments after the required arguments.
Number of required directive arguments.
- required_arguments = 1¶
Number of required directive arguments.
- option_spec: ClassVar[OptionSpec] = {'align': <function align_spec>, 'alt': <function unchanged>, 'caption': <function unchanged>, 'class': <function class_option>, 'graphviz_dot': <function unchanged>, 'height': <function length_or_unitless>, 'index': <function bool_option>, 'layout': <function unchanged>, 'name': <function unchanged>, 'viz': <function bool_option>, 'width': <function length_or_percentage_or_unitless>}¶
Mapping of option names to validator functions.