class documentation

class Parser(docutils.parsers.Parser):

Known subclasses: sphinx.parsers.RSTParser

View In Hierarchy

A base class of source parsers. The additional parsers should inherit this class instead of docutils.parsers.Parser. Compared with docutils.parsers.Parser, this class improves accessibility to Sphinx APIs.

The subclasses can access the following objects and functions:

self.app
The application object (sphinx.application.Sphinx)
self.config
The config object (sphinx.config.Config)
self.env
The environment object (sphinx.environment.BuildEnvironment)
self.warn()
Emit a warning. (Same as sphinx.application.Sphinx.warn())
self.info()
Emit an info message. (Same as sphinx.application.Sphinx.info())
Deprecated since version 1.6: warn() and info() is deprecated. Use sphinx.util.logging instead.
Deprecated since version 3.0: parser.app is deprecated.
Method set​_application set_application will be called from Sphinx to set app and other instance variables
Instance Variable ​_app Undocumented
Instance Variable config Undocumented
Instance Variable env Undocumented
Property app Undocumented
def set_application(self, app):
set_application will be called from Sphinx to set app and other instance variables
Parameters
app:SphinxUndocumented
sphinx.application.​Sphinx appSphinx application object
_app =

Undocumented

config =

Undocumented

env =

Undocumented

@property
app: Sphinx =

Undocumented