From 7ccc880a97cfec752564581ad67a645063ef18ce Mon Sep 17 00:00:00 2001 From: Fabio Gandolfi Date: Wed, 24 Sep 2025 11:26:38 +0200 Subject: [PATCH] added handling of parens in datastream values --- src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f6d6079..976f166 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -73,11 +73,11 @@ function App() { // Parse for chart (existing logic) if (line.trim().startsWith('#')) { - const names = line.replace(/^\s*#+\s*/, '').split(/[\s,\t]+/).filter(Boolean) + const names = line.replace(/^\(/, '').replace(/\)$/, '').replace(/^\s*#+\s*/, '').split(/[\s,\t]+/).filter(Boolean) if (names.length > 0) store.setSeries(names) return } - const parts = line.trim().split(/[\s,\t]+/).filter(Boolean) + const parts = line.trim().replace(/^\(/, '').replace(/\)$/, '').split(/[\s,\t]+/).filter(Boolean) if (parts.length === 0) return const values: number[] = [] for (const p of parts) {