mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-18740 Fix TypeError in rest_formatter.py when directive returned by _strip_markup is None
This commit is contained in:
@@ -224,7 +224,7 @@ class RestHTMLTranslator(HTMLTranslator):
|
||||
return HTMLTranslator.visit_problematic(self, node)
|
||||
|
||||
directive, text = self._strip_markup(node.astext())
|
||||
if directive[1:-1] in ('exc', 'class'):
|
||||
if directive and directive[1:-1] in ('exc', 'class'):
|
||||
self.body.append(self.starttag(node, 'a', '', href='psi_element://#typename#' + text))
|
||||
self.body.append(text)
|
||||
self.body.append('</a>')
|
||||
|
||||
Reference in New Issue
Block a user