Skip to content

fix: prevent extra leading whitespace in stopAndPersist when symbol i…#243

Merged
sindresorhus merged 1 commit intosindresorhus:mainfrom
zhanxiaoge:fix/symbol-empty-string
Nov 1, 2024
Merged

fix: prevent extra leading whitespace in stopAndPersist when symbol i…#243
sindresorhus merged 1 commit intosindresorhus:mainfrom
zhanxiaoge:fix/symbol-empty-string

Conversation

@zhanxiaoge
Copy link
Copy Markdown
Contributor

Summary
When using stopAndPersist with { symbol: '', text: 'text...' }, an extra leading whitespace appears before the text in the terminal.

Example Code

import ora from 'ora';

const spinner = ora().start('Ora Start');

setTimeout(() => {
  spinner.stopAndPersist({ symbol: '', text: 'Ora Stop' });
}, 1000);

@sindresorhus sindresorhus merged commit 5117dfb into sindresorhus:main Nov 1, 2024
@zhanxiaoge zhanxiaoge deleted the fix/symbol-empty-string branch November 13, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants