Merge branch 'stable' into 1.7-release

This commit is contained in:
Takeshi KOMIYA 2018-01-29 00:43:48 +09:00
commit 4a6cfe1dfa
3 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,7 @@ Bugs fixed
* #4434: pure numbers as link targets produce warning
* #4477: Build fails after building specific files
* #4449: apidoc: include "empty" packages that contain modules
* #3917: citation labels are tranformed to ellipsis
Testing
--------

View File

@ -212,10 +212,15 @@ class CitationReferences(SphinxTransform):
def apply(self):
# type: () -> None
# mark citation labels as not smartquoted
for citnode in self.document.traverse(nodes.citation):
citnode[0]['support_smartquotes'] = False
for citnode in self.document.traverse(nodes.citation_reference):
cittext = citnode.astext()
refnode = addnodes.pending_xref(cittext, refdomain='std', reftype='citation',
reftarget=cittext, refwarn=True,
support_smartquotes=False,
ids=citnode["ids"])
refnode.source = citnode.source or citnode.parent.source
refnode.line = citnode.line or citnode.parent.line

View File

@ -354,6 +354,8 @@ def is_smartquotable(node):
"""Check the node is smart-quotable or not."""
if isinstance(node.parent, NON_SMARTQUOTABLE_PARENT_NODES):
return False
elif node.parent.get('support_smartquotes', None) is False:
return False
elif getattr(node, 'support_smartquotes', None) is False:
return False
else: