perf: \t -> 4 blanks

This commit is contained in:
Soulter
2023-06-10 12:13:50 +00:00
parent b1ecc929f2
commit b1314bcc31

View File

@@ -187,6 +187,7 @@ def render_markdown(markdown_text, image_width=800, image_height=600, font_size=
_pre_lines = []
for line in pre_lines:
i += 1
line.replace("\t", " ")
if font.getsize(line)[0] > image_width:
cp = line
single_size = font.getsize("")[0]
@@ -209,7 +210,6 @@ def render_markdown(markdown_text, image_width=800, image_height=600, font_size=
for line in pre_lines:
i += 1
line = line.strip()
line.replace("\t", " ")
if pre_in_code and not line.startswith("```"):
height += font_size+4
# pre_codes.append(line)