# Documentation

class rich_rst.RestructuredText(markup: str, code_theme: str | SyntaxTheme | None = 'monokai', show_errors: bool | None = True, guess_lexer: bool | None = False, default_lexer: str | None = 'python', sphinx_compat: bool | None = True, filename: str | None = '<rst-document>')

  A reStructuredText renderable for rich.

  Parameters:

    - markup (str) – A string containing reStructuredText markup.

    - code_theme (Optional[Union[str, SyntaxTheme]]) – Pygments theme for code blocks. Defaults to “monokai”.

    - show_errors (Optional[bool]) – Whether to show system_messages aka errors and warnings.

    - guess_lexer (Optional[bool]) – Whether to guess lexers for code blocks without specified language.

    - default_lexer (Optional[str]) – Which lexer to use if no lexer is guessed or found. Defaults to “python”

    - sphinx_compat (Optional[bool]) – Enable compatibility with Sphinx roles (func, meth, class, etc.) commonly used in Python docstrings. When enabled, these roles render as inline code instead of errors. Defaults to True for better compatibility with Python documentation.

    - filename (Optional[str]) – A file name to use for error messages, useful for debugging purposes. Defaults to “<rst-document>”

rich_rst.ReStructuredText

  alias of `RestructuredText`

rich_rst.reStructuredText

  alias of `RestructuredText`

rich_rst.reST

  alias of `RestructuredText`

rich_rst.RST

  alias of `RestructuredText`