fix: Escape markdown code blocks with quadruple backticks in gallery generation

This commit is contained in:
Andreas Koepf (aider) 2025-01-31 00:27:55 +01:00 committed by Andreas Koepf
parent 252347fed2
commit a3378bd95f
3 changed files with 145 additions and 145 deletions

View file

@ -46,7 +46,7 @@ def generate_gallery() -> str:
# Show examples
content.append("Example tasks:\n")
content.append("```\n")
content.append("````\n")
for i, item in enumerate(dataset):
if i >= 3:
break
@ -56,7 +56,7 @@ def generate_gallery() -> str:
if item.get("metadata"):
content.append(f"Metadata: {item['metadata']}\n")
content.append("\n")
content.append("```\n\n")
content.append("````\n\n")
return "".join(content)