[F] Fix caption

This commit is contained in:
2024-08-06 02:05:52 -04:00
parent e666551805
commit a001d3349e
+1 -1
View File
@@ -58,7 +58,7 @@ if __name__ == '__main__':
for img in re.findall(r'!\[\[(.*)\]\]', md):
if '|' in img:
img, cap = img.split('|', 1)
post['content'] = post['content'].replace(f'![[{img}|{cap}]]', f'<figure><img src="{convert_img_path(img)}" /><figcaption>{cap}</figcaption></figure>')
post['content'] = post['content'].replace(f'![[{img}|{cap}]]', f'<figure><img src="{convert_img_path(img)}" /><caption>{cap}</caption></figure>')
else:
post['content'] = post['content'].replace(f'![[{img}]]', f'<img src="{convert_img_path(img)}" />')