mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refs #4919. As after work of 4919, remove workaround, uncomment temporary disabled code.
This commit is contained in:
@@ -56,8 +56,7 @@ def repr_domxml(node, length=80):
|
|||||||
returns full of DOM XML representation.
|
returns full of DOM XML representation.
|
||||||
:return: DOM XML representation
|
:return: DOM XML representation
|
||||||
"""
|
"""
|
||||||
# text = node.asdom().toxml() # #4919 crush if node has secnumber with tuple value
|
text = node.asdom().toxml()
|
||||||
text = text_type(node) # workaround for #4919
|
|
||||||
if length and len(text) > length:
|
if length and len(text) > length:
|
||||||
text = text[:length] + '...'
|
text = text[:length] + '...'
|
||||||
return text
|
return text
|
||||||
@@ -82,9 +81,8 @@ def apply_source_workaround(node):
|
|||||||
get_full_module_name(node), repr_domxml(node))
|
get_full_module_name(node), repr_domxml(node))
|
||||||
node.source, node.line = node.parent.source, node.parent.line
|
node.source, node.line = node.parent.source, node.parent.line
|
||||||
if isinstance(node, nodes.title) and node.source is None:
|
if isinstance(node, nodes.title) and node.source is None:
|
||||||
# Uncomment these lines after merging into master(1.8)
|
logger.debug('[i18n] PATCH: %r to have source: %s',
|
||||||
# logger.debug('[i18n] PATCH: %r to have source: %s',
|
get_full_module_name(node), repr_domxml(node))
|
||||||
# get_full_module_name(node), repr_domxml(node))
|
|
||||||
node.source, node.line = node.parent.source, node.parent.line
|
node.source, node.line = node.parent.source, node.parent.line
|
||||||
if isinstance(node, nodes.term):
|
if isinstance(node, nodes.term):
|
||||||
logger.debug('[i18n] PATCH: %r to have rawsource: %s',
|
logger.debug('[i18n] PATCH: %r to have rawsource: %s',
|
||||||
|
|||||||
Reference in New Issue
Block a user