Skip to content

Commit

Permalink
Fix enum doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Oct 7, 2024
1 parent fc840b8 commit e5d62f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ def base_sphinx_format(self, doc: str) -> list[str]:
)
return lines

def base_sphinx_format_str(self, doc: str) -> str:
"""Convert string in doxygen format to a string in sphinx format."""
return "\n".join(self.base_sphinx_format(doc))

def docs_in_sphinx_format(self) -> str:
"""Converts self.docs into sphinx format."""
in_block = False
Expand Down Expand Up @@ -2284,7 +2288,7 @@ def generate_enums(self):
# so that they are available in Sphinx-generated doc
symbols = _NL_.join(
[
f""" * ``vlc.{cls}.{v.name}`` { "\n".join(e.base_sphinx_format(v.docs)) }"""
f""" * ``vlc.{cls}.{v.name}`` { e.base_sphinx_format_str(v.docs) }"""
for v in e.vals
]
)
Expand Down

0 comments on commit e5d62f7

Please sign in to comment.