Skip to content

Commit

Permalink
Add ugly workaround until mkdocstrings/griffe#38 is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfbyker committed Feb 10, 2022
1 parent 62a9f99 commit 59a5377
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions mkdocstrings_handlers/vba/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ def find_file_docstring(code: str) -> Docstring:
if is_comment(line):
docstring_lines.append(line)

docstring_value = "\n".join(uncomment_lines(docstring_lines))

# FIXME: https://github.com/mkdocstrings/griffe/issues/38
docstring_value = docstring_value.replace(":", ";")

return Docstring(
"\n".join(uncomment_lines(docstring_lines)),
value=docstring_value,
parser=Parser.google,
parser_options={},
)
Expand Down Expand Up @@ -182,11 +187,16 @@ def find_procedures(code: str) -> Generator[VbaProcedureInfo, None, None]:
break
docstring_lines.append(source_line)

docstring_value = "\n".join(uncomment_lines(docstring_lines))

# FIXME: https://github.com/mkdocstrings/griffe/issues/38
docstring_value = docstring_value.replace(":", ";")

# Yield it and start over.
yield VbaProcedureInfo(
signature=procedure["signature"],
docstring=Docstring(
value="\n".join(uncomment_lines(docstring_lines)),
value=docstring_value,
parser=Parser.google,
parser_options={},
),
Expand Down

0 comments on commit 59a5377

Please sign in to comment.