From b0edf74aeec64f97f15134fd9df1583f1721a7bf Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 18 May 2024 01:39:38 +0200 Subject: [PATCH] fix all the problems --- packages/hs2js/src/parser.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hs2js/src/parser.mjs b/packages/hs2js/src/parser.mjs index 25644c7e..a5b010b4 100644 --- a/packages/hs2js/src/parser.mjs +++ b/packages/hs2js/src/parser.mjs @@ -33,5 +33,5 @@ export function parse(code) { throw new Error('hs2js not ready. await loadParser before calling evaluate or parse functions'); } // for some reason, the parser doesn't like new lines.. - return parser.parse(code.replaceAll('\n\n', '~~~~').replaceAll('\n', '').replaceAll('~~~~', '\n')); + return parser.parse(code.replaceAll('\n\n', '~~~~').replaceAll('\n', ' ').replaceAll('~~~~', ' \n')); }