Update formating_tools.py

This commit is contained in:
Crizomb 2023-04-06 20:14:23 +02:00 committed by GitHub
parent d25a561065
commit be71c9b4b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ def remove_trailing_newline(s):
return s
def isolate_code_bloc(soup):
"""Get codes bloc from the raw html of chatgpt website return a CodeBloc"""
pre_tab = soup.find_all("pre")
code_bloc = []
for code in pre_tab: