Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unintended Stripping of Periods from Messages #226

Open
Karibash opened this issue Jan 5, 2025 · 1 comment
Open

[Bug] Unintended Stripping of Periods from Messages #226

Karibash opened this issue Jan 5, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Karibash
Copy link

Karibash commented Jan 5, 2025

Environment

  • OS: macOS
  • Node Version: v22.12.0
  • Package: @clack/prompts
  • Package Version: v0.9.0

Describe the bug

The parseMessage function is currently removing all trailing period characters (.) from the input message. This behavior is problematic because if a message is meant to end with a period, it's being incorrectly stripped, leading to an unintended alteration of the message.

To Reproduce

https://stackblitz.com/edit/node-v6ivn9er?file=index.js

Steps to reproduce the behavior:

  • Run npm run start.

Expected behavior

Messages that end with a single period should retain this period upon completion of the asynchronous process. Only the periods added for loading indicators should be removed without affecting the original message content.

@Karibash Karibash added the bug Something isn't working label Jan 5, 2025
@github-project-automation github-project-automation bot moved this to Needs triage in Triage Board Jan 5, 2025
@43081j
Copy link
Contributor

43081j commented Jan 5, 2025

I suspect it's as simple as not stripping them in the stop function, so the final message is the original one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants