diff --git a/app/services/ocr_service.py b/app/services/ocr_service.py index 8b52015..f1eb126 100644 --- a/app/services/ocr_service.py +++ b/app/services/ocr_service.py @@ -143,7 +143,7 @@ def _clean_latex_syntax_spaces(expr: str) -> str: # Remove spaces everywhere else (e.g., x \in -> x\in is fine) # Strategy: remove spaces before \ and between non-command chars, # but preserve the space after \command when followed by a non-\ char - cleaned = re.sub(r"\s+(?=\\)", "", content) # remove space before \cmd + cleaned = re.sub(r"\s+(?=\\)", "", content) # remove space before \cmd cleaned = re.sub(r"(?