summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-11-16 11:45:57 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-11-16 11:45:57 +0900
commit4b5eebdc877759e204aa90435aebcf313a44f6cd (patch)
treec240b4ca43ffefc88dda6d3a18ca2a61303aacb4 /sphinx/util
parente5786b888cfce77772f2e11d9f2934b941edbc7d (diff)
parent4583c4b0227e425bca7b3c26b80d904a13a9c714 (diff)
downloadsphinx-git-4b5eebdc877759e204aa90435aebcf313a44f6cd.tar.gz
Merge branch 'stable' into 1.5-release
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/__init__.py1
-rw-r--r--sphinx/util/console.py1
-rw-r--r--sphinx/util/i18n.py1
-rw-r--r--sphinx/util/nodes.py1
-rw-r--r--sphinx/util/pycompat.py1
-rw-r--r--sphinx/util/smartypants.py2
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('"', '&quot;')
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\[\{\(\-]"""