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 is broken for < character #20

Closed
Xstoudi opened this issue Feb 8, 2023 · 1 comment
Closed

Formatting is broken for < character #20

Xstoudi opened this issue Feb 8, 2023 · 1 comment

Comments

@Xstoudi
Copy link

Xstoudi commented Feb 8, 2023

Package version

0.9.1

Node.js and npm version

N/A

Sample Code (to reproduce the issue)

When formatting this code:

@if(paintings.lastPage > paintings.currentPage)
<li>
  Whatever
</li>
@end

is correctly formatted (remains the same), while the following one just get mad:

@if(paintings.lastPage < paintings.currentPage)
<li>
  Whatever
</li>
@end

and end up formatted like this:

@if(paintings.lastPage < paintings.currentPage) <li>
  Whatever
  </li>
  @end

I think it related to the < character.

@Julien-R44
Copy link
Owner

Julien-R44 commented Mar 8, 2023

Actually, the actual formatter is not really a formatter. It's just a super basic thing that I did quickly so there are a lot of unhandled cases.

Making a formatter for Edge is a pretty complicated task to do. To get an idea have a look at this repo for Blade
https://github.com/shufo/blade-formatter
https://github.com/shufo/vscode-blade-formatter
https://github.com/shufo/prettier-plugin-blade

We need almost the same thing, knowing that Blade and Edge share almost the same syntax.
I was planning to fork it and make the necessary modifications but I didn't find the time nor the motivation.

@25Das So feel free to take care of it. :)

I'm closing the issue in the meantime because it's not really related to this repo.
If a formatter is developped, then, in my mind, it will be a CLI tool hosted in a separate repo, that will then be used by this VSCode extension, and/or by a prettier plugin.

@Julien-R44 Julien-R44 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants