File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,23 @@ def _parse(self, content: str) -> None:
52
52
53
53
# Format section
54
54
for part in parts :
55
- self .content += "- {}\n " .format (part [0 ])
55
+ 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 ])
56
64
57
65
for line in part [1 :]:
58
66
self .content += " {}\n " .format (line )
59
67
60
68
self .content = self .content .rstrip ("\n " )
61
69
62
70
def as_markdown (self ) -> str :
63
- return "# {}\n \n {}\n \n " .format (self .name , self .content )
71
+ return "#### {}\n \n {}\n \n " .format (self .name , self .content )
64
72
65
73
def __repr__ (self ) -> str :
66
74
return "Section(name={}, content={})" .format (self .name , self .content )
You can’t perform that action at this time.
0 commit comments