perf: markdown render perf
This commit is contained in:
@@ -214,7 +214,7 @@ def render_markdown(markdown_text, image_width=800, image_height=600, font_size=
|
||||
if font.getsize(line)[0] > image_width:
|
||||
cp = line
|
||||
for ii in range(len(line)):
|
||||
if ii % max_width == 0:
|
||||
if ii % image_width == 0:
|
||||
cp = cp[:ii] + '\n' + cp[ii:]
|
||||
pre_lines[i] = cp
|
||||
cnt+=1
|
||||
|
||||
Reference in New Issue
Block a user