diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index 96355c8c..07693b88 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -4386,6 +4386,7 @@ def save_as_markdown( to_element: int = sys.maxsize, labels: Optional[set[DocItemLabel]] = None, strict_text: bool = False, + escape_html: bool = True, escaping_underscores: bool = True, image_placeholder: str = "", image_mode: ImageRefMode = ImageRefMode.PLACEHOLDER, @@ -4414,6 +4415,7 @@ def save_as_markdown( to_element=to_element, labels=labels, strict_text=strict_text, + escape_html=escape_html, escape_underscores=escaping_underscores, image_placeholder=image_placeholder, image_mode=image_mode, @@ -4435,6 +4437,7 @@ def export_to_markdown( # noqa: C901 to_element: int = sys.maxsize, labels: Optional[set[DocItemLabel]] = None, strict_text: bool = False, + escape_html: bool = True, escape_underscores: bool = True, image_placeholder: str = "", enable_chart_tables: bool = True, @@ -4465,6 +4468,8 @@ def export_to_markdown( # noqa: C901 :type labels: Optional[set[DocItemLabel]] = None :param strict_text: Deprecated. :type strict_text: bool = False + :param escape_html: bool: Whether to escape HTML reserved characters in the + text content of the document. (Default value = True). :param escape_underscores: bool: Whether to escape underscores in the text content of the document. (Default value = True). :type escape_underscores: bool = True @@ -4511,6 +4516,7 @@ def export_to_markdown( # noqa: C901 pages={page_no} if page_no is not None else None, start_idx=from_element, stop_idx=to_element, + escape_html=escape_html, escape_underscores=escape_underscores, image_placeholder=image_placeholder, enable_chart_tables=enable_chart_tables,