Explorar o código

Define `stripNewline` function

Damian Tarnawski hai 1 ano
pai
achega
ea8d3d4531
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      vendor/wasm/js/runtime.js

+ 4 - 0
vendor/wasm/js/runtime.js

@@ -9,6 +9,10 @@ function getElement(name) {
 	return undefined;
 }
 
+function stripNewline(str) {
+    return str.replace(/\n$/, ' ')
+}
+
 class WasmMemoryInterface {
 	constructor() {
 		this.memory = null;