Quellcode durchsuchen

refactor: remove deprecated markdown_utils function

myhloli vor 11 Monaten
Ursprung
Commit
ce202d9258
1 geänderte Dateien mit 0 neuen und 19 gelöschten Zeilen
  1. 0 19
      magic_pdf/libs/markdown_utils.py

+ 0 - 19
magic_pdf/libs/markdown_utils.py

@@ -1,22 +1,3 @@
-@DeprecationWarning
-def escape_special_markdown_char(pymu_blocks):
-    """
-    转义正文里对markdown语法有特殊意义的字符
-    """
-    special_chars = ["*", "`", "~", "$"]
-    for blk in pymu_blocks:
-        for line in blk['lines']:
-            for span in line['spans']:
-                for char in special_chars:
-                    span_text = span['text']
-                    span_type = span.get("_type", None)
-                    if span_type in ['inline-equation', 'interline-equation']:
-                        continue
-                    elif span_text:
-                        span['text'] = span['text'].replace(char, "\\" + char)
-
-    return pymu_blocks
-
 
 def ocr_escape_special_markdown_char(content):
     """