:py:mod:`myst_parser.parsers.directives`
========================================

.. py:module:: myst_parser.parsers.directives

.. autodoc2-docstring:: myst_parser.parsers.directives
   :allowtitles:

Module Contents
---------------

Classes
~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`DirectiveParsingResult <myst_parser.parsers.directives.DirectiveParsingResult>`
     - .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult
          :summary:

Functions
~~~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`parse_directive_text <myst_parser.parsers.directives.parse_directive_text>`
     - .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_text
          :summary:
   * - :py:obj:`parse_directive_options <myst_parser.parsers.directives.parse_directive_options>`
     - .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_options
          :summary:
   * - :py:obj:`parse_directive_arguments <myst_parser.parsers.directives.parse_directive_arguments>`
     - .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_arguments
          :summary:

API
~~~

.. py:class:: DirectiveParsingResult
   :canonical: myst_parser.parsers.directives.DirectiveParsingResult

   .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult

   .. py:attribute:: arguments
      :canonical: myst_parser.parsers.directives.DirectiveParsingResult.arguments
      :type: list[str]
      :value: None

      .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult.arguments

   .. py:attribute:: options
      :canonical: myst_parser.parsers.directives.DirectiveParsingResult.options
      :type: dict
      :value: None

      .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult.options

   .. py:attribute:: body
      :canonical: myst_parser.parsers.directives.DirectiveParsingResult.body
      :type: list[str]
      :value: None

      .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult.body

   .. py:attribute:: body_offset
      :canonical: myst_parser.parsers.directives.DirectiveParsingResult.body_offset
      :type: int
      :value: None

      .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult.body_offset

   .. py:attribute:: warnings
      :canonical: myst_parser.parsers.directives.DirectiveParsingResult.warnings
      :type: list[str]
      :value: None

      .. autodoc2-docstring:: myst_parser.parsers.directives.DirectiveParsingResult.warnings

.. py:function:: parse_directive_text(directive_class: type[docutils.parsers.rst.Directive], first_line: str, content: str, validate_options: bool = True) -> myst_parser.parsers.directives.DirectiveParsingResult
   :canonical: myst_parser.parsers.directives.parse_directive_text

   .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_text

.. py:function:: parse_directive_options(content: str, directive_class: type[docutils.parsers.rst.Directive], validate: bool = True) -> tuple[str, dict, list[str]]
   :canonical: myst_parser.parsers.directives.parse_directive_options

   .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_options

.. py:function:: parse_directive_arguments(directive_cls: type[docutils.parsers.rst.Directive], arg_text: str) -> list[str]
   :canonical: myst_parser.parsers.directives.parse_directive_arguments

   .. autodoc2-docstring:: myst_parser.parsers.directives.parse_directive_arguments
