Merge branch '2.4.x' into 7137_viewcode_non_python_code

This commit is contained in:
Takeshi KOMIYA authored and GitHub committed 2020-02-18 00:29:57 +09:00
commit 739cf21bd9
2 files changed
+1 -1

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ Bugs fixed
* #7146: autodoc: IndexError is raised on suppressed type_comment found
* #7161: autodoc: typehints extension does not support parallel build
* #7151: crashed when extension assigns a value to ``env.indexentries``
* #7170: text: Remove debug print
* #7137: viewcode: Avoid to crash when non-python code given
Testing
-1
View File
@@ -918,7 +918,6 @@ class TextTranslator(SphinxTranslator):
def _depart_admonition(self, node: Element) -> None:
label = admonitionlabels[node.tagname]
indent = sum(self.stateindent) + len(label)
print(self.states[-1])
if (len(self.states[-1]) == 1 and
self.states[-1][0][0] == 0 and
MAXWIDTH - indent >= sum(len(s) for s in self.states[-1][0][1])):