vscode-better-align
vscode-better-align copied to clipboard
Tab indentation replaced by space indentation in PHP files in 1.4.0
In version 1.4.0 the indentation is replaced by spaces if using tabs in PHP files. It doesn't happen in other formats such as typescript. The following example:
<?php
$test = 123;
$test123 = 456;
if ($some_variable) {
$testing = 'test';
$testing_123 = 456;
}
?>
Will result in this with 1.4.0:
<?php
$test = 123;
$test123 = 456;
if ($some_variable) {
$testing = 'test';
$testing_123 = 456;
}
?>
Instead of this (in 1.3.2):
<?php
$test = 123;
$test123 = 456;
if ($some_variable) {
$testing = 'test';
$testing_123 = 456;
}
?>
This is happening on any type of file as of 1.4.0
Seems we need consider more complex case, for example, what if align with mixed whitespce, for example:
$test = 123; // This line contain 1 tab
$test123 = 456; // This line contain 8 whilte sapce
@chouzz seems like this is still a problem:
https://github.com/user-attachments/assets/cd469cd0-070d-4d4b-ad33-86d79db7158b