Skip to content

Commit

Permalink
Make latex build not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed May 27, 2024
1 parent a012f65 commit ebe90e7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sphinx_js/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from sphinx.util.docfields import GroupedField, TypedField
from sphinx.writers.html5 import HTML5Translator
from sphinx.writers.text import TextTranslator
from sphinx.writers.latex import LaTeXTranslator

from .renderers import (
AutoAttributeRenderer,
Expand Down Expand Up @@ -327,6 +328,14 @@ def text_depart_desc_js_type_parameter_list(
self.add_text(">")


def latex_visit_desc_type_parameter_list(self: LaTeXTranslator, node: nodes.Element) -> None:
pass


def latex_depart_desc_type_parameter_list(self: LaTeXTranslator, node: nodes.Element) -> None:
pass


def add_param_list_to_signode(signode: desc_signature, params: str) -> None:
paramlist = desc_js_type_parameter_list()
for arg in params.split(","):
Expand Down Expand Up @@ -502,4 +511,8 @@ def add_directives(app: Sphinx) -> None:
text_visit_desc_js_type_parameter_list,
text_depart_desc_js_type_parameter_list,
),
latex=(
latex_visit_desc_type_parameter_list,
latex_depart_desc_type_parameter_list,
),
)

0 comments on commit ebe90e7

Please sign in to comment.