Skip to content

Commit

Permalink
Merge pull request mermaid-js#4701 from jonashaag/jonashaag-patch-1
Browse files Browse the repository at this point in the history
Use utf8 encoding in Jupyter example
  • Loading branch information
sidharthv96 authored Sep 6, 2023
2 parents c212490 + bcd0315 commit 773abbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/config/Tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ from IPython.display import Image, display
import matplotlib.pyplot as plt

def mm(graph):
graphbytes = graph.encode("ascii")
base64_bytes = base64.b64encode(graphbytes)
base64_string = base64_bytes.decode("ascii")
display(Image(url="https://mermaid.ink/img/" + base64_string))
graphbytes = graph.encode("utf8")
base64_bytes = base64.b64encode(graphbytes)
base64_string = base64_bytes.decode("ascii")
display(Image(url="https://mermaid.ink/img/" + base64_string))

mm("""
graph LR;
Expand Down
8 changes: 4 additions & 4 deletions packages/mermaid/src/docs/config/Tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ from IPython.display import Image, display
import matplotlib.pyplot as plt

def mm(graph):
graphbytes = graph.encode("ascii")
base64_bytes = base64.b64encode(graphbytes)
base64_string = base64_bytes.decode("ascii")
display(Image(url="https://mermaid.ink/img/" + base64_string))
graphbytes = graph.encode("utf8")
base64_bytes = base64.b64encode(graphbytes)
base64_string = base64_bytes.decode("ascii")
display(Image(url="https://mermaid.ink/img/" + base64_string))

mm("""
graph LR;
Expand Down

0 comments on commit 773abbe

Please sign in to comment.