Skip to content

Commit

Permalink
Merge pull request #139 from StephLin/bugfix/fix-tmpfile-encoding
Browse files Browse the repository at this point in the history
Fix encoding of tmp input file
  • Loading branch information
timkpaine authored Sep 12, 2024
2 parents dd57871 + 21b7d63 commit 32b2077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinxcontrib/mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def render_mm(self, code, options, _fmt, prefix="mermaid"):

ensuredir(os.path.dirname(outfn))

with open(tmpfn, "w") as t:
with open(tmpfn, "w", encoding="utf-8") as t:
t.write(code)

if isinstance(mermaid_cmd, str):
Expand Down

0 comments on commit 32b2077

Please sign in to comment.