python-minifier icon indicating copy to clipboard operation
python-minifier copied to clipboard

f-strings convert to normal strings

Open Boss-1s opened this issue 1 month ago • 2 comments

Describe the bug When using the minify tool on ViperIDE to save disk space, the tool renders the f in front of an f-string as an extra character, thus converting the f-string into a normal string.

To Reproduce Steps to reproduce the behavior:

  1. Go to viper-ide.org.
  2. Type in some f-strings.
  3. Enter the tools tab, then hit 'Minify'.
  4. You will notice that the the f in front of the string is gone.

Expected behavior The minify tool was expected to keep the f-strings, yet it converted them to normal strings, making patching hard, especially if you have a LOT of strings that need placeholders.

Screenshots Image Image

Boss-1s avatar Dec 08 '25 23:12 Boss-1s

That doesn't look like it's using this project to minify. If you put the same code into python-minifier.com does it work like you expect?

dflook avatar Dec 09 '25 09:12 dflook

Huh. I get the intended result.

But it is dependent on this project, as seen on line 206 of this file..

Also, to clarify, I originally made an issue in the ViperIDE repo, but was redirected here, as seen in this comment.

Boss-1s avatar Dec 10 '25 02:12 Boss-1s