docling-project / docling-project/docling-core
Image Markdown issue
- Dominant language
- HTML
- Stars
- 282
- Forks
- 214
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 21
Description
doc_core/doc/types/document.py Line 963. Seems like it is creating an issue.
`def export_to_markdown(
self,
doc: "DoclingDocument",
add_caption: bool = True, # deprecated
image_mode: ImageRefMode = ImageRefMode.EMBEDDED,
image_placeholder: str = "",
) -> str:
"""Export picture to Markdown format."""
from docling_core.experimental.serializer.markdown import MarkdownDocSerializer
if not add_caption:
_logger.warning(
"Argument `add_caption` is deprecated and will be ignored.",
)
serializer = MarkdownDocSerializer(
doc=self, ----> This probably should be doc but not sure
image_mode=image_mode,
)
text = (
serializer.picture_serializer.serialize(
item=self,
doc_serializer=serializer,
doc=doc,
image_mode=image_mode,
image_placeholder=image_placeholder,
).text
if serializer.picture_serializer
else ""
)
return text`
This method is throwing pydantic validation error. Due the first variable passed to MDSerializer should be DoclingDocument
Contributor guide
Assessment
This issue has not been assessed yet.