Skip to content

Commit

Permalink
Add pylatexenc to exceptions list
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Teixeira de Lima committed Jan 27, 2025
1 parent 9b5e482 commit b3bf971
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docling/backend/docx_latex/omml.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import lxml.etree as ET
import pylatexenc # type: ignore
from pylatexenc.latexencode import UnicodeToLatexEncoder

from docling.backend.docx_latex.latex_dict import (
ALN,
Expand Down Expand Up @@ -177,7 +177,7 @@ class oMath2Latex(Tag2Method):
_t_dict = T

__direct_tags = ("box", "sSub", "sSup", "sSubSup", "num", "den", "deg", "e")
u = pylatexenc.latexencode.UnicodeToLatexEncoder(
u = UnicodeToLatexEncoder(
replacement_latex_protection="braces-all",
unknown_char_policy="keep",
unknown_char_warning=False,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ module = [
"deepsearch_glm.*",
"lxml.*",
"bs4.*",
"huggingface_hub.*"
"huggingface_hub.*",
"pylatexenc.*"
]
ignore_missing_imports = true

Expand Down

0 comments on commit b3bf971

Please sign in to comment.