From 8a07edf656ab8f03b64feb11a4ef1dd5c651342b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 4 Jan 2024 00:00:47 +0200 Subject: [PATCH] Only remove leading newlines --- public/scripts/power-user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 986c9eac3..cb6e2ca11 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -1848,8 +1848,8 @@ export function renderStoryString(params) { // substitute {{macro}} params that are not defined in the story string output = substituteParams(output, params.user, params.char); - // remove leading whitespace - // output = output.trimStart(); + // remove leading newlines + output = output.replace(/^\n+/, ''); // add a newline to the end of the story string if it doesn't have one if (output.length > 0 && !output.endsWith('\n')) {