Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Formatting Bug]: Adds spaces where there shouldn't be #239

Closed
calebdw opened this issue Sep 22, 2023 · 1 comment · Fixed by shufo/blade-formatter#874
Closed

[Formatting Bug]: Adds spaces where there shouldn't be #239

calebdw opened this issue Sep 22, 2023 · 1 comment · Fixed by shufo/blade-formatter#874
Assignees
Labels
bug Something isn't working

Comments

@calebdw
Copy link

calebdw commented Sep 22, 2023

Version

1.11.1

Template before formatting

@php
    use Eagle\Utilities\Dates\TimeZone;
<- no spaces here
    $timezone_options =
        ['' => ''] +
        TimeZone::create()
            ->format('tz-label')
            ->countryCodePriority('US')
            ->get();
@endphp

Template after formatting

@php
    use Eagle\Utilities\Dates\TimeZone;
    <- four spaces here
    $timezone_options =
        ['' => ''] +
        TimeZone::create()
            ->format('tz-label')
            ->countryCodePriority('US')
            ->get();
@endphp

Expected Behaviour

The formatter shouldn't input spaces where there should just be a newline char---some editors show these whitespace characters and remove them automatically:

image

Note that this only applies to extra spaces at the end of the line

Relevant log output

No response

@shufo
Copy link
Owner

shufo commented Oct 9, 2023

Fixed at https://github.com/shufo/prettier-plugin-blade/releases/tag/v1.13.1.
Thank you @calebdw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants