From 05d5ac5a75e7135c53cbbcb960fb1f80d1cf7bc4 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 19 Dec 2024 20:07:18 +0100 Subject: [PATCH] Allow \n in doc comments --- api/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/utils.ts b/api/src/utils.ts index 1a7ab6e5..9e3e16d8 100644 --- a/api/src/utils.ts +++ b/api/src/utils.ts @@ -1,6 +1,6 @@ // remove indent in multi-line comments export const comment = (str: TemplateStringsArray, ...values: any[]) => - str.reduce((acc, str, i) => `${acc}${str}${values[i]}`).replace(/^\s+/gm, ""); + str.reduce((acc, str, i) => `${acc}${str}${values[i]}`).replace(/^[^\S\n]+/gm, ""); export type RemovePrefix< T extends string,