summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-03-02 08:37:54 +0100
committerGeorg Brandl <georg@python.org>2014-03-02 08:37:54 +0100
commitdb0f7ccc705b37617faf7c6139e96dc826dfdb22 (patch)
tree7f6b06b863e28bd69ddebc27db5f1260500dc1d3
parenta2c975307c30318b16c245944d694622c7c925f0 (diff)
parentc68104b1be74b8b102a2f3bf394e03072c760cfa (diff)
downloadsphinx-git-db0f7ccc705b37617faf7c6139e96dc826dfdb22.tar.gz
merge with stable
-rw-r--r--CHANGES10
-rw-r--r--sphinx/builders/gettext.py3
-rw-r--r--sphinx/quickstart.py1
-rw-r--r--sphinx/theming.py2
-rw-r--r--sphinx/util/docfields.py6
-rw-r--r--sphinx/writers/text.py3
6 files changed, 20 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 50de9a383..912d69603 100644
--- a/CHANGES
+++ b/CHANGES
@@ -122,7 +122,15 @@ Bugs fixed
* #1358: Fix handling of image paths outside of the source directory when using
the "wildcard" style reference.
* #1374: Fix for autosummary generating overly-long summaries if first line
- doesn't end with a period
+ doesn't end with a period.
+* #1391: Actually prevent using "pngmath" and "mathjax" extensions at the same
+ time in sphinx-quickstart.
+* #1386: Fix bug preventing more than one theme being added by the entry point
+ mechanism.
+* #1370: Ignore "toctree" nodes in text writer, instead of raising.
+* #1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
+* #1367: Fix a change of PR#96 that break sphinx.util.docfields.Field.make_field
+ interface/behavior for `item` argument usage.
Documentation
-------------
diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py
index 9bb24df8c..06ea45055 100644
--- a/sphinx/builders/gettext.py
+++ b/sphinx/builders/gettext.py
@@ -55,6 +55,9 @@ class Catalog(object):
self.metadata = {} # msgid -> file, line, uid
def add(self, msg, origin):
+ if not hasattr(origin, 'uid'):
+ # Nodes that are replicated like todo don't have a uid, however i18n is also unnecessary.
+ return
if msg not in self.metadata: # faster lookup in hash
self.messages.append(msg)
self.metadata[msg] = []
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index 1241e0987..87ec3ce38 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -1183,6 +1183,7 @@ Please indicate if you want to use one of the following Sphinx extensions:''')
if d['ext_pngmath'] and d['ext_mathjax']:
print('''Note: pngmath and mathjax cannot be enabled at the same time.
pngmath has been deselected.''')
+ d['ext_pngmath'] = False
if 'ext_ifconfig' not in d:
do_prompt(d, 'ext_ifconfig', 'ifconfig: conditional inclusion of '
'content based on config values (y/n)', 'n', boolean)
diff --git a/sphinx/theming.py b/sphinx/theming.py
index ac25de71d..abc09c17f 100644
--- a/sphinx/theming.py
+++ b/sphinx/theming.py
@@ -72,7 +72,7 @@ class Theme(object):
for theme in os.listdir(themedir):
if not path.isfile(path.join(themedir, theme, THEMECONF)):
continue
- cls.themes[theme] = (path.join(themedir, theme), None)
+ cls.themes[theme] = (path.join(themedir, theme), None)
def __init__(self, name):
if name not in self.themes:
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 7e167d9e0..abb732886 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -67,7 +67,7 @@ class Field(object):
fieldname += nodes.Text(' ')
fieldname += self.make_xref(self.rolename, domain,
fieldarg, nodes.Text)
- fieldbody = nodes.field_body('', nodes.paragraph('', '', content))
+ fieldbody = nodes.field_body('', nodes.paragraph('', '', *content))
return nodes.field('', fieldname, fieldbody)
@@ -272,10 +272,10 @@ class DocFieldTransformer(object):
groupindices[typename] = len(entries)
group = [typedesc, []]
entries.append(group)
- entry = typedesc.make_entry(fieldarg, translatable_content)
+ entry = typedesc.make_entry(fieldarg, [translatable_content])
group[1].append(entry)
else:
- entry = typedesc.make_entry(fieldarg, translatable_content)
+ entry = typedesc.make_entry(fieldarg, [translatable_content])
entries.append([typedesc, entry])
# step 2: all entries are collected, construct the new field list
diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py
index b748010fa..62d3791fb 100644
--- a/sphinx/writers/text.py
+++ b/sphinx/writers/text.py
@@ -729,6 +729,9 @@ class TextTranslator(nodes.NodeVisitor):
def visit_index(self, node):
raise nodes.SkipNode
+ def visit_toctree(self, node):
+ raise nodes.SkipNode
+
def visit_substitution_definition(self, node):
raise nodes.SkipNode