diff --git a/main_test.go b/main_test.go index 09fe9628..30fb4e65 100644 --- a/main_test.go +++ b/main_test.go @@ -1,3 +1,6 @@ +//go:build !tinygo +// +build !tinygo + package main_test import ( diff --git a/wasm/grol_wasm.html b/wasm/grol_wasm.html index dfb166fb..c8e46a58 100644 --- a/wasm/grol_wasm.html +++ b/wasm/grol_wasm.html @@ -73,6 +73,7 @@ if (output && output.result !== undefined) { // Write the result to the output textarea document.getElementById('output').value = output.result; + document.getElementById('input').value = output.formatted; document.getElementById('errors').value = output.errors.join("\n"); } else { document.getElementById('errors').value = "Unexpected runtime error, see JS console"; @@ -85,6 +86,7 @@ } finally { inst = await WebAssembly.instantiate(mod, go.importObject); // reset instance } + resizeTextarea(document.getElementById('input')); resizeTextarea(document.getElementById('output')); resizeTextarea(document.getElementById('errors')); } @@ -102,21 +104,25 @@