Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Update mineru/utils/format_utils.py

Xiaomeng Zhao6ed75347a6e8
diff --git a/mineru/utils/format_utils.py b/mineru/utils/format_utils.py
index ad0a4357..7167e9c4 100644
--- a/mineru/utils/format_utils.py
+++ b/mineru/utils/format_utils.py
@@ -320,6 +320,19 @@ def convert_otsl_to_html(otsl_content: str):
def block_content_to_html(block_content: str) -> str:
+ """
+ Converts block content containing OTSL (Open Table Structure Language) tags into HTML.
+
+ This function processes a block of text, splitting it into lines and converting any lines
+ containing OTSL table tags (e.g., <fcel>, <ecel>) into HTML tables. Lines without these
+ tags are left unchanged.
+
+ Parameters:
+ block_content (str): A string containing block content with potential OTSL tags.
+
+ Returns:
+ str: The processed block content with OTSL tags converted to HTML tables.
+ """
lines = block_content.split("\n\n")
new_lines = []
for line in lines: