mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-26 05:07:35 -05:00
Added an `only` directive that can selectively include text
based on enabled "tags". Tags can be given on the command line. Also, the current builder output format (e.g. "html" or "latex") is always a defined tag.
This commit is contained in:
+6
-3
@@ -99,8 +99,9 @@ class TestApp(application.Sphinx):
|
||||
|
||||
def __init__(self, srcdir=None, confdir=None, outdir=None, doctreedir=None,
|
||||
buildername='html', confoverrides=None,
|
||||
status=None, warning=None,
|
||||
freshenv=None, confname='conf.py', cleanenv=False):
|
||||
status=None, warning=None, freshenv=None,
|
||||
warningiserror=None, tags=None,
|
||||
confname='conf.py', cleanenv=False):
|
||||
|
||||
application.CONFIG_FILENAME = confname
|
||||
|
||||
@@ -136,10 +137,12 @@ class TestApp(application.Sphinx):
|
||||
warning = ListOutput('stderr')
|
||||
if freshenv is None:
|
||||
freshenv = False
|
||||
if warningiserror is None:
|
||||
warningiserror = False
|
||||
|
||||
application.Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
|
||||
buildername, confoverrides, status, warning,
|
||||
freshenv)
|
||||
freshenv, warningiserror, tags)
|
||||
|
||||
def cleanup(self, doctrees=False):
|
||||
AutoDirective._registry.clear()
|
||||
|
||||
Reference in New Issue
Block a user