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

Reformating code adds an empty row under comments #115

Open
Staniik opened this issue Aug 11, 2020 · 3 comments
Open

Reformating code adds an empty row under comments #115

Staniik opened this issue Aug 11, 2020 · 3 comments
Labels

Comments

@Staniik
Copy link

Staniik commented Aug 11, 2020

Hello,
I have PhpStorm 2020.2 and latte plugin 1.1.0.
If I repeatedly call the formatting of the template, then another blank line is always added to line 2.

flou-skeleton_–_totok_latte
If I remove a comment or condition from the template, then the formatting will work correctly.
It is very important to follow the exact structure as in the picture in order to simulate the error.

@mesour mesour added the bug label Nov 20, 2020
@mesour mesour changed the title Bad formatting with specific latte template structure Bad formatting with specific latte template structure (probably after comment) Jan 21, 2021
@mesour mesour changed the title Bad formatting with specific latte template structure (probably after comment) Reformating code adds an empty row under comments Jan 21, 2021
@janvalentik
Copy link

Hello, I have PhpStorm version 2021.2 and plugin version 1.1.3
Template before formatting https://pastebin.com/1hrH5VL8
Template after 5 times format https://pastebin.com/FdAsTi6g

@mesour
Copy link
Collaborator

mesour commented Oct 22, 2021

Possible same problem as: #165

@mesour
Copy link
Collaborator

mesour commented Oct 22, 2021

Problem is caused by native Intellij Code formatter. Some special coding for Latte language is required.

Maybe I will create a question on the Intellij forum. Because in documentation is not more information about blank lines formating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants