Workaround for convert_to_markdown bug

This commit is contained in:
oobabooga 2025-01-23 06:21:40 -08:00
parent 7f8c1c1f07
commit 0485ff20e8

View File

@ -154,6 +154,8 @@ def add_long_list_class(html):
@functools.lru_cache(maxsize=None)
def convert_to_markdown(string):
if not string:
return ""
# Make \[ \] LaTeX equations inline
pattern = r'^\s*\\\[\s*\n([\s\S]*?)\n\s*\\\]\s*$'