Changes from https://github.com/juk0de/ChatMastermind.git #1

Closed
ok wants to merge 176 commits from main into juk
Showing only changes of commit 3ef1339cc0 - Show all commits

View File

@ -55,9 +55,10 @@ def message_to_chat(message: dict[str, str],
def display_source_code(content: str) -> None: def display_source_code(content: str) -> None:
try: try:
content_start = content.index('```') content_start = content.index('```')
content_start = content.index('\n', content_start) + 1
content_end = content.rindex('```') content_end = content.rindex('```')
if content_start + 3 < content_end: if content_start < content_end:
print(content[content_start + 3:content_end].strip()) print(content[content_start:content_end].strip())
except ValueError: except ValueError:
pass pass