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 // substitute {{macro}} params that are not defined in the story string
output = substituteParams(output, params.user, params.char); output = substituteParams(output, params.user, params.char);
// remove leading whitespace // remove leading newlines
// output = output.trimStart(); output = output.replace(/^\n+/, '');
// add a newline to the end of the story string if it doesn't have one // add a newline to the end of the story string if it doesn't have one
if (output.length > 0 && !output.endsWith('\n')) { if (output.length > 0 && !output.endsWith('\n')) {