The auto-format feature in VScode seems to be messing up in a few specific cases. Here's an example of one below.

Original File

<style>
    .container<?=$unique_id?> {
        width: 100%;
        height: 100%;
    }

    .container<?=$unique_id?> img {
        max-height:100%;
        max-width: 100%;
    }
</style>

<a target="_blank" href="<?=$adData['click_link']?>" class="container<?=$unique_id?> text-center">
    <img src="<?=$envConfig['simembers_img_url']?>/ads/<?=$unique_id?>/<?=$unique_id?>.jpg">
</a>

After auto-format

<style>
    .container

    <?= $unique_id ?>
        {
        width: 100%;
        height: 100%;
    }

    .container

    <?= $unique_id ?>
    img {
        max-height: 100%;
        max-width: 100%;
    }
</style>
<a target="_blank" href="<?= $adData['click_link'] ?>" class="container<?= $unique_id ?> text-center">
    <img src="<?= $envConfig['simembers_img_url'] ?>/ads/<?= $unique_id ?>/<?= $unique_id ?>.jpg">
</a>
    5 days later

    Hello Camden,

    Thank you for reporting this. I can confirm this is happening -> will be fixed.

    Thanks!

      2 months later

      This also affects my code base, is there a known timeline/commit this will get fixed on?

        2 months later

        Hello,

        Sorry, it took a while. We've fixed this one, the patch will be in the next pre-release.

        Thank you!

          Write a Reply...