File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -458,15 +458,14 @@ def update_markdown_image_tags(doc: Node, data: bytes) -> bytes:
458458 # try preventing replacing host url in other paces
459459 dir_fallback_md = ']('
460460 dir_fallback_md += '../' * levels
461- dir_fallback_md += args .images_dir
461+ dir_fallback_md += args .images_dir + "/uploads/images/"
462462 dir_fallback_html = '<img src="'
463463 dir_fallback_html += '../' * levels
464- dir_fallback_html += args .images_dir
464+ dir_fallback_html += args .images_dir + "/uploads/images/"
465465
466466 host = removesuffix (args .host , '/' )
467- data = data .replace (f']({ host } ' .encode (), dir_fallback_md .encode ())
468- data = data .replace (f'<img src="{ host } ' .encode (), dir_fallback_html .encode ())
469- print ("md images" )
467+ data = data .replace (f']({ host } /uploads/images/' .encode (), dir_fallback_md .encode ())
468+ data = data .replace (f'<img src="{ host } /uploads/images/' .encode (), dir_fallback_html .encode ())
470469 data_str = re .sub (r'/scaled-\d+-/' , r'/' , data .decode ())
471470 return data_str .encode ()
472471
You can’t perform that action at this time.
0 commit comments