diff options
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/__init__.py | 1 | ||||
-rw-r--r-- | sphinx/util/console.py | 1 | ||||
-rw-r--r-- | sphinx/util/i18n.py | 1 | ||||
-rw-r--r-- | sphinx/util/nodes.py | 1 | ||||
-rw-r--r-- | sphinx/util/pycompat.py | 1 | ||||
-rw-r--r-- | sphinx/util/smartypants.py | 2 |
6 files changed, 6 insertions, 1 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index a383ba5ae..7ac5c62f7 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -170,6 +170,7 @@ def copy_static_entry(source, targetdir, builder, context={}, builder, context, level=level+1, exclude_matchers=exclude_matchers) + _DEBUG_HEADER = '''\ # Sphinx version: %s # Python version: %s (%s) diff --git a/sphinx/util/console.py b/sphinx/util/console.py index 7974ebb2b..593634b11 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -90,6 +90,7 @@ def create_color_func(name): return colorize(name, text) globals()[name] = inner + _attrs = { 'reset': '39;49;00m', 'bold': '01m', diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index 446925cdb..112353d47 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -125,6 +125,7 @@ def find_catalog_source_files(locale_dirs, locale, domains=None, gettext_compact return catalogs + # date_format mappings: ustrftime() to bable.dates.format_datetime() date_format_mappings = { '%a': 'EEE', # Weekday as locale’s abbreviated name. diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 2b899afce..fe3b0f2f9 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -351,4 +351,5 @@ def _new_copy(self): newnode.line = self.line return newnode + nodes.Element.copy = _new_copy diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 6ff5e3567..e3b17ef62 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -144,6 +144,7 @@ class _DeprecationWrapper(object): return self._deprecated[attr] return getattr(self._mod, attr) + sys.modules[__name__] = _DeprecationWrapper(sys.modules[__name__], dict( zip_longest = zip_longest, product = product, diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py index 2f4acbc8d..dee2f50ba 100644 --- a/sphinx/util/smartypants.py +++ b/sphinx/util/smartypants.py @@ -81,8 +81,8 @@ def sphinx_smarty_pants(t): t = t.replace('"', '"') return t -# Constants for quote education. +# Constants for quote education. punct_class = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]""" end_of_word_class = r"""[\s.,;:!?)]""" close_class = r"""[^\ \t\r\n\[\{\(\-]""" |