This commit is contained in:
mrT23
2023-12-10 19:45:54 +02:00
parent a247fc3263
commit 2b1e841ef1

View File

@ -80,7 +80,7 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool=True) -> str:
return markdown_text
def parse_code_suggestion(code_suggestions: dict, i:int, gfm_supported: bool=True) -> str:
def parse_code_suggestion(code_suggestions: dict, i: int = 0, gfm_supported: bool = True) -> str:
"""
Convert a dictionary of data into markdown format.
@ -91,12 +91,10 @@ def parse_code_suggestion(code_suggestions: dict, i:int, gfm_supported: bool=Tru
str: A string containing the markdown formatted text generated from the input dictionary.
"""
markdown_text = ""
if gfm_supported and 'relevant line' in code_suggestions:
if i == 0:
markdown_text += "<hr>"
if gfm_supported and 'relevant line' in code_suggestions:
# markdown_text=markdown_text.strip()
markdown_text += '<table>'
relevant_file = ''
for sub_key, sub_value in code_suggestions.items():
try:
if sub_key.lower() == 'relevant file':