Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
a8ca1830
Commit
a8ca1830
authored
May 06, 2025
by
myhloli
Browse files
feat(modeling): add 'protect' command to removal patterns
parent
b29b73af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/model/sub_modules/mfr/unimernet/unimernet_hf/modeling_unimernet.py
..._modules/mfr/unimernet/unimernet_hf/modeling_unimernet.py
+1
-1
No files found.
magic_pdf/model/sub_modules/mfr/unimernet/unimernet_hf/modeling_unimernet.py
View file @
a8ca1830
...
@@ -334,7 +334,7 @@ def fix_latex_environments(s):
...
@@ -334,7 +334,7 @@ def fix_latex_environments(s):
UP_PATTERN
=
re
.
compile
(
r
'\\up([a-zA-Z]+)'
)
UP_PATTERN
=
re
.
compile
(
r
'\\up([a-zA-Z]+)'
)
COMMANDS_TO_REMOVE_PATTERN
=
re
.
compile
(
COMMANDS_TO_REMOVE_PATTERN
=
re
.
compile
(
r
'\\(?:lefteqn|boldmath|ensuremath|centering|textsubscript|sides|textsl|textcent|emph)'
)
r
'\\(?:lefteqn|boldmath|ensuremath|centering|textsubscript|sides|textsl|textcent|emph
|protect
)'
)
REPLACEMENTS_PATTERNS
=
{
REPLACEMENTS_PATTERNS
=
{
re
.
compile
(
r
'\\underbar'
):
r
'\\underline'
,
re
.
compile
(
r
'\\underbar'
):
r
'\\underline'
,
re
.
compile
(
r
'\\Bar'
):
r
'\\hat'
,
re
.
compile
(
r
'\\Bar'
):
r
'\\hat'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment