From 6585380a4c6ae16f45555624dd9d6f23033a20f3 Mon Sep 17 00:00:00 2001 From: Alexandre Djerbetian Date: Sun, 25 Aug 2024 11:18:27 +0300 Subject: [PATCH 1/3] Fix tutorials.md with url safe encoding See https://github.com/jihchi/mermaid.ink/issues/396 for the bug that this PR fixes. --- packages/mermaid/src/docs/ecosystem/tutorials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs/ecosystem/tutorials.md b/packages/mermaid/src/docs/ecosystem/tutorials.md index d5bf9330d..7258361bf 100644 --- a/packages/mermaid/src/docs/ecosystem/tutorials.md +++ b/packages/mermaid/src/docs/ecosystem/tutorials.md @@ -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)) From 0049372b2e28c40f839db100173bf755c8384061 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 26 Aug 2024 10:25:56 +0530 Subject: [PATCH 2/3] chore: Add urlsafe to cspell --- .cspell/code-terms.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.cspell/code-terms.txt b/.cspell/code-terms.txt index 6d6dad045..d0e40e8f2 100644 --- a/.cspell/code-terms.txt +++ b/.cspell/code-terms.txt @@ -138,6 +138,7 @@ tsdoc typeof typestr unshift +urlsafe verifymethod VERIFYMTHD WARN_DOCSDIR_DOESNT_MATCH From 49a77dda3a55ae32a7b38ee3bdd7c9cf33e0ddc3 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:00:41 +0000 Subject: [PATCH 3/3] [autofix.ci] apply automated fixes --- docs/ecosystem/tutorials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ecosystem/tutorials.md b/docs/ecosystem/tutorials.md index 26498f090..6d7966c31 100644 --- a/docs/ecosystem/tutorials.md +++ b/docs/ecosystem/tutorials.md @@ -63,7 +63,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))