Skip to content

Commit 21ac195

Browse files
authored
Force Unix style path for image URI fix #640
Ensure image URI uses Unix style path for compatibility. Signed-off-by: clach04 <clach04@gmail.com>
1 parent 2a78701 commit 21ac195

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docling_core/types/doc/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5921,7 +5921,7 @@ def _with_pictures_refs(
59215921
scale = img.size[0] / item.prov[0].bbox.width
59225922
item.image = ImageRef.from_pil(image=img, dpi=round(72 * scale))
59235923
elif item.image is not None:
5924-
item.image.uri = Path(obj_path)
5924+
item.image.uri = Path(obj_path).as_posix() # force Unix style, even under Windows for correct html and markdown path
59255925

59265926
# if item.image._pil is not None:
59275927
# item.image._pil.close()

0 commit comments

Comments
 (0)