konversi p ke double new line dan br ke single new line
This commit is contained in:
parent
2bad6764d1
commit
8b2d9222d2
2 changed files with 3 additions and 2 deletions
|
@ -19,7 +19,7 @@ App ini masih dalam pengembangan dan banyak hal yang belum bisa dilakukan, berik
|
|||
- [x] Delay antar fungsi
|
||||
- [ ] Cron internal
|
||||
- [ ] ~Build~
|
||||
- [ ] Benahi html ke markdown, karena pakai parse `MarkdownV2`
|
||||
- [x] ~Benahi html ke markdown, karena pakai parse `MarkdownV2`~ pakai html
|
||||
|
||||
## Install
|
||||
Clone repositori ini dan install di lokal.
|
||||
|
|
3
main.py
3
main.py
|
@ -133,7 +133,8 @@ async def kirim_ke_tele():
|
|||
raw = raw.rsplit("</p>", 1)[0]
|
||||
|
||||
rubah_p = re.sub(r"</p>", "\n\n", raw)
|
||||
status_text = re.sub(r"<.*?>", "", rubah_p)
|
||||
rubah_br = re.sub(r"<br>", "\n", rubah_p)
|
||||
status_text = re.sub(r"<.*?>", "", rubah_br)
|
||||
|
||||
try:
|
||||
await bot.send_message(
|
||||
|
|
Loading…
Reference in a new issue