blade-formatter icon indicating copy to clipboard operation
blade-formatter copied to clipboard

[Formatting Bug]: @unless directives having too much indentation

Open JulianGlueck opened this issue 2 years ago • 4 comments

Version

1.32.13

Template before formatting

@unless ($suppressMarkup)
    <style>
        .demoClass {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 10pt;
        }
    </style>

    <p class="demoClass">
@endunless

    {{ $content }}

@unless ($suppressMarkup)
    </p>
@endunless

Template after formatting

@unless ($suppressMarkup)
    <style>
        .demoClass {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 10pt;
        }
    </style>

    <p class="demoClass">
    @endunless

    {{ $content }}

    @unless ($suppressMarkup)
    </p>
@endunless

Expected Behaviour

In my opinion, the first "@endunless" in line 10 and the second "@unless" in line 14 should not have any indentation as their corresponding start / end directive is not indented. I assume this is a bug and not the expected result.

Relevant log output

No response

JulianGlueck avatar Jun 28 '23 11:06 JulianGlueck

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Aug 28 '23 01:08 github-actions[bot]

Related issue: https://github.com/shufo/blade-formatter/issues/646

shufo avatar Oct 15 '23 10:10 shufo

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Dec 15 '23 01:12 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Mar 01 '24 01:03 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar May 08 '24 01:05 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Oct 13 '24 02:10 github-actions[bot]