Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v2_fixes' into v2_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Nov 27, 2024
2 parents 9626ffd + 90d779c commit 70da706
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions marker/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

from pydantic import BaseModel
from ftfy import fix_text

from marker.renderers.html import HTMLOutput
from marker.renderers.json import JSONOutput
Expand Down Expand Up @@ -29,6 +30,7 @@ def text_from_rendered(rendered: BaseModel):

def save_output(rendered: BaseModel, output_dir: str, fname_base: str):
text, ext, images = text_from_rendered(rendered)
text = fix_text(text)

with open(os.path.join(output_dir, f"{fname_base}.{ext}"), "w+") as f:
f.write(text)
Expand Down

0 comments on commit 70da706

Please sign in to comment.