Only remove leading newlines

This commit is contained in:
Cohee 2024-01-04 00:00:47 +02:00
parent 5ca909ab13
commit 8a07edf656
1 changed files with 2 additions and 2 deletions

View File

@ -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')) {