Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions templates/assets/scripts/v-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ vdocs.examples = {

el.querySelector('.v-code-btn-run').addEventListener('click', (evt)=>{

let code = editor.getValue();
let url = "https://play.vlang.io/?base64=" + btoa(code);
const code = editor.getValue();
const b64 = btoa(code);
const url = "https://play.vlang.io/?base64=" + encodeURIComponent(b64);

window.open(url, "_blank");

Expand Down