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
38d0a622
Unverified
Commit
38d0a622
authored
May 06, 2025
by
Xiaomeng Zhao
Committed by
GitHub
May 06, 2025
Browse files
Merge pull request #2423 from myhloli/dev
feat(modeling): add 'protect' command to removal patterns
parents
11bf98d0
a8ca1830
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 @
38d0a622
...
...
@@ -334,7 +334,7 @@ def fix_latex_environments(s):
UP_PATTERN
=
re
.
compile
(
r
'\\up([a-zA-Z]+)'
)
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
=
{
re
.
compile
(
r
'\\underbar'
):
r
'\\underline'
,
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