Forráskód Böngészése

Update mineru/utils/format_utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao 3 hónapja
szülő
commit
6ed75347a6
1 módosított fájl, 13 hozzáadás és 0 törlés
  1. 13 0
      mineru/utils/format_utils.py

+ 13 - 0
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: