Giter Site home page Giter Site logo

Comments (7)

onecentlin avatar onecentlin commented on June 26, 2024

@sven-ahrens Hi, can you check your format setting?

I have two blade formatter installed, either won't break the syntax

圖片

from laravel-blade-snippets-vscode.

onecentlin avatar onecentlin commented on June 26, 2024

@sven-ahrens I noticed that your input tag does not close properly

from laravel-blade-snippets-vscode.

sven-ahrens avatar sven-ahrens commented on June 26, 2024

@sven-ahrens I noticed that your input tag does not close properly

Hey, first of all: Thank you so much for replying.

You are right, my example is missing the closing tag but in my "real" code it doesn't. I checked that right now.

Bildschirmfoto 2022-03-04 um 17 02 23

and it turns into:

Bildschirmfoto 2022-03-04 um 17 02 51

Also I've selected your formatter:

Bildschirmfoto 2022-03-04 um 17 03 14

Bildschirmfoto 2022-03-04 um 17 03 24

Versions

  • Visual Studio Code: 1.65.0
  • Laravel Blade Snippets: v1.31.0
  • macOS: Monterey 12.2.1

from laravel-blade-snippets-vscode.

sven-ahrens avatar sven-ahrens commented on June 26, 2024

I'm not sure if it breaks because of the force-expand-multiline but I've made an easier example outside of my project and this is leading to the same result:

<div>
    <label></label>
    <input type="radio" name="test" value="1" @checked($test->works()) />
</div>
<div>
    <label></label>
    <input
        type="radio"
        name="test"
        value="1"
        @checked($test-
    >works()) />
</div>

from laravel-blade-snippets-vscode.

onecentlin avatar onecentlin commented on June 26, 2024

@sven-ahrens How about change force-expand-multiline to force-aligned. This may fit your needs.

from laravel-blade-snippets-vscode.

sven-ahrens avatar sven-ahrens commented on June 26, 2024

@sven-ahrens How about change force-expand-multiline to force-aligned. This may fit your needs.

I'm coming from Vue background and I'm used to have them exactly like in my example.

I tried your version out and yes this works but it seems like it's a bug then, isnt it?

The formatter will break when having force-expand-multiline activated

from laravel-blade-snippets-vscode.

onecentlin avatar onecentlin commented on June 26, 2024

@sven-ahrens Blade formatter is build based on HTML formatter. However, php syntax is not treat the same way as html.
Since the new directive @check() comes out, it is not like simple key-value attributes that recognized by HTML formatter.
I think that's why it treat php syntax -> the part > as close tag.

from laravel-blade-snippets-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.