mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Fix tutorials.md with url safe encoding
See https://github.com/jihchi/mermaid.ink/issues/396 for the bug that this PR fixes.
This commit is contained in:

committed by
GitHub

parent
f653510d1b
commit
6585380a4c
@@ -57,7 +57,7 @@ import matplotlib.pyplot as plt
|
||||
|
||||
def mm(graph):
|
||||
graphbytes = graph.encode("utf8")
|
||||
base64_bytes = base64.b64encode(graphbytes)
|
||||
base64_bytes = base64.urlsafe_b64encode(graphbytes)
|
||||
base64_string = base64_bytes.decode("ascii")
|
||||
display(Image(url="https://mermaid.ink/img/" + base64_string))
|
||||
|
||||
|
Reference in New Issue
Block a user