How to keep Pinegrow from reformatting my code?

How do I stop Pinegrow from reformatting my code?
I write it like this so it is more compact.

    <ul class="list-group">
        <li><a href="#" class="list-group-item">Link</a></li>
        <li><a href="#" class="list-group-item">Link</a></li>
        <li><a href="#" class="list-group-item">Link</a></li>
        <li><a href="#" class="list-group-item">Link</a></li>
    </ul>

Then Pinegrow reformats the code to this

<ul class="list-group">
	<li>
		<a href="#" class="list-group-item">Link</a>
	</li>
	<li>
		<a href="#" class="list-group-item">Link</a>
	</li>
	<li> 
		<a href="#" class="list-group-item">Link</a>
	</li>
	<li> 
		<a href="#" class="list-group-item">Link</a>
	</li>
</ul>

I hates it!

Right clicking in code editor produces above results and at the same time seems to be the way to select entire sections of code at once. How to keep the code selecting but stop the code reformatting?

Ok, I used Notepad++ to compact an html page to one line. Opened it in Pinegrow and it completely reformatted the code essentially rewriting my code to how IT thinks an html page should be formatted and look like,. I don’t want my code messed with by an editor, if I am going to be dictated or forced to code the way the editor thinks things should be then I don’t want this software.

Hi Terry,

yes, that’s how Pinegrow works at the moment. We are working on ways to preserve user formatting in HTML.

Matjaz

Having a similar issue with html reformat.

It is changing all attributes to lowercase and this is a no no with angular 2.

“*ngFor” is getting reformat to “*ngfor” and that breaks angular 2.

It is possible to disable html reformat?

Using Pinegrow 3.01 Pro

Yep. Agree, this should be an option. (four-space indents is overkill, repositioning curly brackets… it has a mind of its own) I do my manual editing in EditPlus and it’s a little annoying to see stuff mangled.

I realise this is personal choice, but as Terry44 says “I hates it!”

If it were to compact the code instead of expand it I would not mind but essentially rewriting the formatting is something that should not be happening at all. It’s a common programmers error making software the way they want it to behave instead of leaving it open to the user to choose. Overall though Pinegrow is very customizable.

This is a HUGE issue, has this been resolved yet? I’m not seeing a setting to bypass this issue. But it completely breaks my code as I have many items that can’t be reformatted, it’s changing object names from upper to lower in all cases and in the end breaks the layout.

Even if I change all my objects, it re-formats the page and breaks a symantecly correct page.

This is very bad practices with a WYSIWYG code editor and makes it impossible for me to use the software until I find a way around this auto formatting issue.

Is there some type of hidden config file that I can change the var on to avoid any reformatting of any kind?

Thanks so much.

EDIT > saving the HTML file rips out the following, why?

</body>
</html>

Since Pinegrow 4.8 (31 may 2018) you can control HTML formatting!

Preserving the HTML formatting

By default, Pinegrow auto-formats the HTML code using common-sense formatting options. That is an issue for users that prefer to keep their own HTML formatting when editing documents in Pinegrow.

Now, the auto-formatting can be disabled in Settings.

With this setting, Pinegrow only auto-formats the elements that are added to the page visually, for example dragged from the Library panel. Of course this also means that you’ll have to take responsibility for formatting the HTML code after manipulating the layout in Pinegrow.

See full release notes v4.8:

1 Like

Thank you for the reply, sadly it still changes things even after I did disable the Auto-format HTML Code, which I did do before posting to this forum, the two biggest things are changing the code blocks to lower case and the oddest thing is removing the ending HTML tags.

Is there anyway to control the software from making any changes to my code? Like changing the code blocks to lower case and the oddest thing yet is removing the ending HTML tags. I would have never even noticed this if not for version control. Thanks

Don’t know if you already did this, you can contact Pinegrow Support. They know how this “formatting” is implemented.

When you give them access to your project files/page(s) (Dropbox/OneDrive or something), they can have a look and see if they can find something that lead to this issues you have.

Preventing me from writing something wrong, but I never experienced something like this.

Suggestion:

Have you ever had contact to the great support(at)pinegrow(dot)com? Ask em, share the file with em and I’m pretty sure you’ll get help.

I expect this is not being a real core problem, more a user-specific (OS, config, Firewall, corrupted FONTs …) one.

My two cents

Cheers

Thomas

@Marf You beat me by seconds I suppose :slight_smile:

@Thomas Sorry that I was a bit faster, better 2 reactions than none.

Like Thomas already mentioned, it must be a user-specific problem, an exotic combination of factors that lead to this outcome.