We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25a0fd0 commit 195998aCopy full SHA for 195998a
magic_pdf/dict2md/ocr_mkcontent.py
@@ -66,13 +66,13 @@ def mk_mm_markdown2(pdf_info_dict:dict):
66
for line in para:
67
for span in line['spans']:
68
span_type = span.get('type')
69
- if span_type == 'text':
+ if span_type == ContentType.Text:
70
para_text += span['content']
71
- elif span_type == 'inline_equation':
+ elif span_type == ContentType.InlineEquation:
72
para_text += f" ${span['content']}$ "
73
- elif span_type == 'displayed_equation':
+ elif span_type == ContentType.InterlineEquation:
74
para_text += f"$$\n{span['content']}\n$$ "
75
- elif span_type == 'image':
+ elif span_type == ContentType.Image:
76
para_text += f" "
77
markdown.append(para_text)
78
0 commit comments