Skip to content

Commit

Permalink
Fix #15956: error when building with Sphinx 4.5
Browse files Browse the repository at this point in the history
Unfortunately it breaks building with older versions.

The only way to fix this issue for all versions is to stop monkey-patching
and forward the fix to Sphinx upstream.
  • Loading branch information
mitya57 committed Jun 15, 2022
1 parent b7258c3 commit d5568fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/tools/coqrst/coqdomain.py
Expand Up @@ -37,7 +37,7 @@
from sphinx.util.docutils import ReferenceRole
from sphinx.util.logging import getLogger, get_node_location
from sphinx.util.nodes import set_source_info, set_role_source_info, make_refnode
from sphinx.writers.latex import LaTeXTranslator
from sphinx.writers.latex import CR, LaTeXTranslator

from . import coqdoc
from .repl import ansicolors
Expand All @@ -54,10 +54,13 @@ def visit_desc_signature(self, node):
for id in node['ids']:
hyper += self.hypertarget(id)
self.body.append(hyper)
if not self.in_desc_signature:
self.in_desc_signature = True
self.body.append(CR + r'\pysigstartsignatures')
if not node.get('is_multiline'):
self._visit_signature_line(node)
else:
self.body.append('%\n\\pysigstartmultiline\n')
self.body.append(CR + r'\pysigstartmultiline')
LaTeXTranslator.visit_desc_signature = visit_desc_signature

PARSE_ERROR = """{}:{} Parse error in notation!
Expand Down

0 comments on commit d5568fc

Please sign in to comment.