mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-04-04 15:08:36 +07:00
11 lines
270 B
Python
11 lines
270 B
Python
|
|
def ocr_escape_special_markdown_char(content):
|
|
"""
|
|
转义正文里对markdown语法有特殊意义的字符
|
|
"""
|
|
special_chars = ["*", "`", "~", "$"]
|
|
for char in special_chars:
|
|
content = content.replace(char, "\\" + char)
|
|
|
|
return content
|