forked from LiveCarta/BookConverter
Add replace to work with Win
This commit is contained in:
@@ -37,7 +37,7 @@ def update_src_links_in_images(body_tag: Tag,
|
||||
for img in img_tags:
|
||||
path_to_img_from_html = img.attrs.get('src')
|
||||
html_folder = os.path.dirname(path_to_html)
|
||||
path_to_img_from_root = os.path.normpath(os.path.join(html_folder, path_to_img_from_html))
|
||||
path_to_img_from_root = os.path.normpath(os.path.join(html_folder, path_to_img_from_html)).replace('\\', '/')
|
||||
|
||||
assert path_to_img_from_root in href2img_content, \
|
||||
f'Image {path_to_img_from_html} in file {path_to_html} was not added to manifest.'
|
||||
|
||||
Reference in New Issue
Block a user