Skip to content

Commit

Permalink
fix: improve docstring support for ":raises ...:"
Browse files Browse the repository at this point in the history
There can be dots in the FQCN of the exception class.

Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Nov 9, 2023
1 parent 7ef5ea7 commit b0a03cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def patch_markdown_content(self, content: str) -> str:
content = re.sub("```\n---", "```\n\n---", content)
# Add markup for some common field name conventions in function docstring
content = re.sub(
r"\n:(\w+)[ ]+([\w\\*]+):",
r"\n:(\w+)[ \t]+([\w\\*.]+):",
lambda m: "\n__{field}:__ `{name}`".format(
field=m.group(1).title(),
name=m.group(2).replace("\\_", "_").replace("\\*", "*"),
Expand Down

0 comments on commit b0a03cf

Please sign in to comment.