diff --git a/docs/src/lib/playground.js b/docs/src/lib/playground.js index 3c4222082a..5f8293c7d5 100644 --- a/docs/src/lib/playground.js +++ b/docs/src/lib/playground.js @@ -44,10 +44,14 @@ async function exec({ command, files }) { stdout: JSON.stringify(body.result[0].expressions[0].value, undefined, 2), }; } - const { message: stderr } = await resp.json(); + + const errorText = await resp.text(); return { ok, - stderr, + stderr: errorText + .replace(/^"|"$/g, "") + .replace(/\\n/g, "\n") + .replace(/\\t/g, "\t"), }; }