Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: refine LaTeX escaping function for Gradio to handle angle brackets correctly
myhloli31f4a1ab64fc
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.pyindex d347f733..80deec15 100644--- a/mineru/cli/gradio_app.py+++ b/mineru/cli/gradio_app.py@@ -487,8 +487,8 @@ def replace_image_with_base64(markdown_text, image_dir_path):def _escape_latex_html_chars_for_gradio(content):- """转义公式内部会被 Gradio HTML 解析链路误判的字符。"""- return content.replace("&", "&").replace("<", "<").replace(">", ">")+ """转义公式内部会被 Gradio HTML 解析链路误判的尖括号,保留 LaTeX 对齐用 &。"""+ return content.replace("<", "<").replace(">", ">")def escape_latex_blocks_for_gradio_preview(markdown_text, latex_delimiters):