From 22dbd7d2723ccfd6011f9cbfa39d4915cee25b87 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 23 Aug 2022 22:49:37 +0200 Subject: [PATCH] fix multiline arg --- frontend/src/lib/components/ArgInput.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 6ce64a2de6..86f46f868c 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -81,10 +81,9 @@ } function recomputeRowSize(str: string) { - if (str.length > 50) { - minRows = 3 - } - if (type != 'string') { + if (type == 'string') { + minRows = str.split('\n').length + } else if (type != 'string') { minRows = Math.max(minRows, Math.min(str.split(/\r\n|\r|\n/).length + 1, maxRows)) } }