Rename rst_prologue to rst_prolog and document it.

This commit is contained in:
Georg Brandl 2010-04-07 13:03:34 +02:00
parent d7f1aeba8c
commit 63289cba33
4 changed files with 12 additions and 3 deletions

View File

@ -15,6 +15,8 @@ Release 1.0 (in development)
* Added ``tab-width`` option to ``literalinclude`` directive.
* Added ``rst_prolog`` config value.
* Added ``html_secnumber_suffix`` config value to control section
numbering format.

View File

@ -182,6 +182,13 @@ General configuration
.. versionadded:: 0.6
.. confval:: rst_prolog
A string of reStructuredText that will be included at the beginning of every
source file that is read.
.. versionadded:: 1.0
.. confval:: default_role
.. index:: default; role

View File

@ -59,7 +59,7 @@ class Config(object):
keep_warnings = (False, 'env'),
modindex_common_prefix = ([], 'html'),
rst_epilog = (None, 'env'),
rst_prologue = (None, 'env'),
rst_prolog = (None, 'env'),
trim_doctest_flags = (True, 'env'),
needs_sphinx = (None, None),

View File

@ -590,8 +590,8 @@ class BuildEnvironment:
data = arg[0]
if self.config.rst_epilog:
data = data + '\n' + self.config.rst_epilog + '\n'
if self.config.rst_prologue:
data = self.config.rst_prologue + '\n' + data
if self.config.rst_prolog:
data = self.config.rst_prolog + '\n' + data
return data
# publish manually