mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-04-29 00:27:09 +08:00
hack the Gemini markdown formst 2
This commit is contained in:
parent
da079d795d
commit
4a40cf7695
@ -69,7 +69,7 @@ def gemini_handler(message: Message, bot: TeleBot) -> None:
|
|||||||
gemini_reply_text = player.last.text.strip()
|
gemini_reply_text = player.last.text.strip()
|
||||||
# Gemini is often using ':' in **Title** which not work in Telegram Markdown
|
# Gemini is often using ':' in **Title** which not work in Telegram Markdown
|
||||||
gemini_reply_text = gemini_reply_text.replace(":**", "\:**")
|
gemini_reply_text = gemini_reply_text.replace(":**", "\:**")
|
||||||
gemini_reply_text = gemini_reply_text.replace(":**", "**")
|
gemini_reply_text = gemini_reply_text.replace(":**", "**\: ")
|
||||||
except StopCandidateException as e:
|
except StopCandidateException as e:
|
||||||
match = re.search(r'content\s*{\s*parts\s*{\s*text:\s*"([^"]+)"', str(e))
|
match = re.search(r'content\s*{\s*parts\s*{\s*text:\s*"([^"]+)"', str(e))
|
||||||
if match:
|
if match:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user