mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable' into 1.7-release
This commit is contained in:
commit
4a6cfe1dfa
1
CHANGES
1
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user