Page 1 of 1
<pad> results are different when using or not using a variable
Posted: 08 Mar 2025 19:28
by altoclef
Code: Select all
$string = 'abcd';
$r1 = "<pad 12>abcd"; // 8 spaces, then the string (12 characters in total)
$r2 = "<pad 12>$string"; // 12 spaces, then the variable
text "$r1<crlf>$r2";
(v26.90.0200)
(EDIT: Correct the first comment, which incorrectly referred to "the variable")
Re: <pad> results are different when using or not using a variable
Posted: 09 Mar 2025 12:16
by admin
Interesting bug!

Fixed in next beta.

Re: <pad> results are different when using or not using a variable
Posted: 09 Mar 2025 19:07
by altoclef
Confirm fixed in v26.90.0206. Thank you.
However, this is a breaking change as some existing scripts using
<pad> will now work differently from previously. In fact, I wonder whether
most of those existing scripts will now break, as use with a variable value must be more common than without. (I know that
<pad> is also used in Batch Rename so perhaps script usage is much less common than in that.)
I don't have any affected scripts as I've only just discovered
<pad> so I'm OK, thanks

. However, others may be affected. Would it be helpful for the release notes to mention that this is a breaking change?
Re: <pad> results are different when using or not using a variable
Posted: 09 Mar 2025 19:34
by admin
It's clearly a bug fix. So it's not a breaking change, it's a fixing change.
