homchom / recode

a utility-focused fabric mod to make DiamondFire development more fun
GNU Lesser General Public License v3.0
27 stars 28 forks source link

Whitespace bugfix #61

Closed Electric131 closed 1 year ago

Electric131 commented 1 year ago

Hard to describe what this solves, but it simply removes trailing whitespace from /dfgive clipboard to fix issues if you copied a newline after the text. Very small bug yes, but also like an 8 character change so..

homchom commented 1 year ago

I know you say it'd be "hard to describe", but please try. So far I don't know what this actually intends to solve.

algamoda commented 1 year ago

When using the /dfgive clipboard command, someone may accidentally copy a whitespace from the end of a text, causing it to give the "trailing whitespace" error upon performing the command.

Electric131 commented 1 year ago

The issue is that there is no visual way to show the issue, it is simple that my clipboard could be /give @s stone and it works fine (in both). But the difference is with /give @s stone\n where the \n would just the newline character itself. In the current build, this will fail with a whitespace error (picture attached), but in the changed build it works as one would assume. image

homchom commented 1 year ago

thanks!