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

Freemarker formatting not working #8

Open
bruno-robert opened this issue Mar 9, 2020 · 5 comments
Open

Freemarker formatting not working #8

bruno-robert opened this issue Mar 9, 2020 · 5 comments

Comments

@bruno-robert
Copy link

I can't seem to get pretty formatter to work on my Freemarker documents (.ftl).
I've tried:

  • alt + shift + f (Format document)
  • Format document with... (and then selecting pretty formater)

and both times there are 0 changes made to the document. Is there something I'm missing?

@Sayyiditow
Copy link

Sayyiditow commented Nov 2, 2020

Diff issue for me, format runs but ends up messing the document and the freemarker code gets messed up. See below after running formater.

image

The space after <#include gets removed, elements following get tabbed.

@amravazzi
Copy link

Has it been fixed?

@shotforsky
Copy link

I ran into a silimar issue,
before I format the code in VSCode with Pretty Formmater, the code is:

<html>

<head>
    <title>Welcome!</title>
</head>

<body>
    <#include "../common/header.html" />
    <h1>Welcome ${user}!</h1>
</body>

</html>

And after being formatted, the code becomes:

<html>

    <head>
        <title>Welcome!</title>
    </head>

    <body>
        <#include"../common/header.html"/>
            <h1>Welcome ${user}!</h1>
        </body>
    </body>
</html>

duplicate tags were inserted and ident was incorrect.

@BBaysinger
Copy link

@shotforsky's issue is more than similar to OP's, it's the exact same issue. This is a blocker in what I'm trying to accomplish, since there is no other formatter that works...

@shotforsky
Copy link

shotforsky commented Nov 14, 2022

@BBaysinger

I end up using IDEA to format my freemarker code, it works great. You can take a try if that is possible and necessary for you.

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

5 participants