Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
7f27dd12
Unverified
Commit
7f27dd12
authored
Apr 23, 2024
by
myhloli
Committed by
GitHub
Apr 23, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #52 from myhloli/master
避免空para导致的error
parents
ef0129ad
81f73a3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
ocr_mkcontent.py
magic_pdf/dict2md/ocr_mkcontent.py
+1
-0
No files found.
magic_pdf/dict2md/ocr_mkcontent.py
View file @
7f27dd12
...
@@ -94,6 +94,7 @@ def ocr_mk_markdown_with_para_core(paras_of_layout, mode, img_buket_path=""):
...
@@ -94,6 +94,7 @@ def ocr_mk_markdown_with_para_core(paras_of_layout, mode, img_buket_path=""):
def
ocr_mk_markdown_with_para_core_v2
(
paras_of_layout
,
mode
,
img_buket_path
=
""
):
def
ocr_mk_markdown_with_para_core_v2
(
paras_of_layout
,
mode
,
img_buket_path
=
""
):
page_markdown
=
[]
page_markdown
=
[]
for
para_block
in
paras_of_layout
:
for
para_block
in
paras_of_layout
:
para_text
=
''
para_type
=
para_block
.
get
(
'type'
)
para_type
=
para_block
.
get
(
'type'
)
if
para_type
==
BlockType
.
Text
:
if
para_type
==
BlockType
.
Text
:
para_text
=
merge_para_with_text
(
para_block
)
para_text
=
merge_para_with_text
(
para_block
)
...
...
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