mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-21 14:58:05 +00:00
refactor(en): restructure en/documents to match zh structure
- Reorganize from 7 flat directories to 5 aggregated directories - 00-fundamentals: core concepts, glue coding, methodology - 01-getting-started: environment setup guides - 02-methodology: tools, tutorials, development guides - 03-practice: project examples (polymarket, telegram, fate-engine, etc.) - 04-resources: templates, tools, external resources - Remove duplicate files with underscore naming - Add README.md for 00-fundamentals and 02-methodology
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
# Telegram Markdown Code Block Format Fix Log 2025-12-15
|
||||
|
||||
## Problem
|
||||
|
||||
After completing the astrological chart generation, sending a message reports an error:
|
||||
```
|
||||
❌ Chart generation failed: Can't parse entities: can't find end of the entity starting at byte offset 168
|
||||
```
|
||||
|
||||
## Cause
|
||||
|
||||
The Markdown code block format for the `header` message in `bot.py` is incorrect.
|
||||
|
||||
The original code used string concatenation, adding `\n` after ```, which caused the Telegram Markdown parser to incorrectly identify the code block boundary:
|
||||
|
||||
```python
|
||||
# Incorrect way
|
||||
header = (
|
||||
"```\n"
|
||||
f"{filename}\n"
|
||||
"```\n"
|
||||
)
|
||||
```
|
||||
|
||||
## Fix
|
||||
|
||||
Changed to a triple-quoted string to ensure ``` is on a separate line:
|
||||
|
||||
```python
|
||||
# Correct way
|
||||
header = f"""Report attached
|
||||
```
|
||||
{filename}
|
||||
{ai_filename}
|
||||
```
|
||||
"""
|
||||
```
|
||||
|
||||
## Modified File
|
||||
|
||||
- `services/telegram-service/src/bot.py` lines 293-308
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user