Giter VIP home page Giter VIP logo

Comments (5)

ThaJay avatar ThaJay commented on May 28, 2024 1

This looks much better
image
So actually, this is also a tool to help fix bad formatting. Make the blocks happy and make devs without blocks happy too.

from vscode-blockman.

leodevbro avatar leodevbro commented on May 28, 2024

I don't see any issues here. What do you mean only one block is needed ?

You have turned on analyzing square brackets. Maybe you could turn it off and keep only analyzing curly brackets turned on. So, the blocks won't be too overloaded. But anyway, the blocks are rendering correctly as I see in the image.

from vscode-blockman.

ThaJay avatar ThaJay commented on May 28, 2024

On the top left before 'issued_date', the the purple bracket starts a block instead of the purple curly brace after function, which would correspond with the end of the block. In this situation it would seem more logical to me to use the yellow bracket and the if statement for a block. Right now it looks a bit inconsistent starting at the second bracket and ending at the last curly brace.

The purple bracket is a single line statement and the function curly brace I believe may be skipped because it starts and ends on the same line as the yellow bracket, so the block could start one column earlier and take up the whole line that has the closing bracket and brace.

from vscode-blockman.

leodevbro avatar leodevbro commented on May 28, 2024

No, the start indicator of the block is not the purple bracket. The start indicator is the yellow bracket. You can test it, just write anything between the yellow and the purple brackets, for example a comment like this: /*commnet*/.

And also, the end indicator of the block is not the last curly bracket. It's the last yellow square bracket. You can test it, just write /*commnet*/ between them.

from vscode-blockman.

ThaJay avatar ThaJay commented on May 28, 2024

Ah I see, it looks like that because there is no newline after the yellow bracket. It seems to me that a block is only needed when a newline follows a block token, but that may not work for all code bases.

Prettier would have probably added a newline after the yellow bracket, after the comma before function and after the last curly brace so it seems to be mostly down to bad formatting here.

from vscode-blockman.

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.