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:
5252
5353 # Format section
5454 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 ])
5664
5765 for line in part [1 :]:
5866 self .content += " {}\n " .format (line )
5967
6068 self .content = self .content .rstrip ("\n " )
6169
6270 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 )
6472
6573 def __repr__ (self ) -> str :
6674 return "Section(name={}, content={})" .format (self .name , self .content )
You can’t perform that action at this time.
0 commit comments