We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9475e52 commit 31c3985Copy full SHA for 31c3985
1 file changed
docstring_to_markdown/google.py
@@ -52,15 +52,23 @@ def _parse(self, content: str) -> None:
52
53
# Format section
54
for part in parts:
55
- self.content += "- {}\n".format(part[0])
+ if ":" in part[0]:
56
+ spl = part[0].split(":")
57
+
58
+ arg = spl[0]
59
+ description = ":".join(spl[1:])
60
61
+ self.content += "- `{}`: {}\n".format(arg, description)
62
+ else:
63
+ self.content += "- {}\n".format(part[0])
64
65
for line in part[1:]:
66
self.content += " {}\n".format(line)
67
68
self.content = self.content.rstrip("\n")
69
70
def as_markdown(self) -> str:
- return "# {}\n\n{}\n\n".format(self.name, self.content)
71
+ return "#### {}\n\n{}\n\n".format(self.name, self.content)
72
73
def __repr__(self) -> str:
74
return "Section(name={}, content={})".format(self.name, self.content)
0 commit comments