The new `trim_footnote_reference_space` config value mirrors

the docutils config value of the same name and removes the
space before a footnote reference that is necessary for reST
to recognize the reference.
This commit is contained in:
Georg Brandl 2009-01-26 23:38:02 +01:00
parent 2413580d1b
commit 4e3c3a43fc
4 changed files with 16 additions and 1 deletions

View File

@ -64,6 +64,11 @@ New features added
- The default value for ``htmlhelp_basename`` is now the project - The default value for ``htmlhelp_basename`` is now the project
title, cleaned up as a filename. title, cleaned up as a filename.
- The new ``trim_footnote_reference_space`` config value mirrors
the docutils config value of the same name and removes the
space before a footnote reference that is necessary for reST
to recognize the reference.
* Builders: * Builders:
- New builder for Qt help collections, by Antonio Valentino. - New builder for Qt help collections, by Antonio Valentino.

View File

@ -261,7 +261,14 @@ Project information
A boolean that decides whether :dir:`moduleauthor` and :dir:`sectionauthor` A boolean that decides whether :dir:`moduleauthor` and :dir:`sectionauthor`
directives produce any output in the built files. directives produce any output in the built files.
.. confval:: trim_footnote_reference_space
Trim spaces before footnote references that are necessary for the reST parser
to recognize the footnote, but do not look too nice in the output.
.. versionadded:: 0.6
.. _html-options: .. _html-options:
Options for HTML output Options for HTML output

View File

@ -45,6 +45,7 @@ class Config(object):
default_role = (None, True), default_role = (None, True),
add_function_parentheses = (True, True), add_function_parentheses = (True, True),
add_module_names = (True, True), add_module_names = (True, True),
trim_footnote_reference_space = (False, True),
show_authors = (False, True), show_authors = (False, True),
pygments_style = ('sphinx', False), pygments_style = ('sphinx', False),
highlight_language = ('python', False), highlight_language = ('python', False),

View File

@ -59,7 +59,7 @@ default_settings = {
# This is increased every time an environment attribute is added # This is increased every time an environment attribute is added
# or changed to properly invalidate pickle files. # or changed to properly invalidate pickle files.
ENV_VERSION = 27 ENV_VERSION = 28
default_substitutions = set([ default_substitutions = set([
@ -517,6 +517,8 @@ class BuildEnvironment:
self.docname = docname self.docname = docname
self.settings['input_encoding'] = self.config.source_encoding self.settings['input_encoding'] = self.config.source_encoding
self.settings['trim_footnote_reference_space'] = \
self.config.trim_footnote_reference_space
class SphinxSourceClass(FileInput): class SphinxSourceClass(FileInput):
def read(self): def read(self):