Less indentation

main
Bob Mottram 2024-07-15 20:15:39 +01:00
parent f3d985dfa7
commit 13378eebbe
1 changed files with 28 additions and 24 deletions

View File

@ -185,8 +185,12 @@ def _markdown_replace_links(markdown: str) -> str:
if ctr == 0:
ctr += 1
continue
if '[' in sections_links[ctr - 1] and \
')' in link_section:
if not ('[' in sections_links[ctr - 1] and
')' in link_section):
ctr += 1
continue
link_text = sections_links[ctr - 1].split('[')[-1]
link_url = link_section.split(')')[0]
replace_str = '[' + link_text + '](' + link_url + ')'