IvanMathy / Boop

A scriptable scratchpad for developers. In slow yet steady progress.
https://boop.okat.best
MIT License
3.84k stars 356 forks source link

[bug] Trim not working (and leading and trailing trim are not available). #373

Open 7ombie opened 1 year ago

7ombie commented 1 year ago

I recently installed Boop (very cool, by the way), and tried to write an extension for stripping newlines intelligently (preserving paragraphs and indentation). I didn't want to (substantially) complicate the code to handle an obscure corner case related to trailing whitespace, as I assumed Boop could remove trailing spaces already.

When I enter trim in the search-bar, only Trim (trim leading and trailing whitespace) shows up in the list. There're no options for only removing leading or trailing spaces. Furthermore, when I run Trim, nothing happens (at all). I tried selecting text - everything I could think of, and nothing worked.

I only knew that Boop supported all three trim functions because the PR came up when I searched for issues before opening this. There may be other functions that are missing from the list??

Note: I haven't installed my extension yet (I was developing it in the browser, so it'd be mostly done when I copied it to Boop). The only thing I've done is change the extensions directory (to ~/Projects/boop). That directory is empty (ignoring hidden system files).