# How to keep Pinegrow from reformatting my code?

**URL:** <https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379>\
**Category:** General\
**Created:** [November 18, 2016, 3:50am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379 "2016-11-18T03:50:18Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry44](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/terry44/32/175_2.png) [@Terry44](https://forum.pinegrow.com/u/Terry44)\
**Post date:** [November 18, 2016, 3:50am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/1 "2016-11-18T03:50:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Terry44](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/terry44/32/175_2.png) [@Terry44](https://forum.pinegrow.com/u/Terry44)\
**Post date:** [November 18, 2016, 4:06am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/2 "2016-11-18T04:06:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Terry44](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/terry44/32/175_2.png) [@Terry44](https://forum.pinegrow.com/u/Terry44)\
**Post date:** [November 18, 2016, 4:34am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/3 "2016-11-18T04:34:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [November 18, 2016, 8:15am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/4 "2016-11-18T08:15:21Z")

</div>

Hi Terry,

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

Matjaz

---

<div class="post-metadata">

**Author:** ![jomrrispa](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jomrrispa](https://forum.pinegrow.com/u/jomrrispa)\
**Post date:** [July 2, 2017, 3:41pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/5 "2017-07-02T15:41:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![caconym](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@caconym](https://forum.pinegrow.com/u/caconym)\
**Post date:** [July 4, 2017, 3:13pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/6 "2017-07-04T15:13:30Z")

</div>

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!”

---

<div class="post-metadata">

**Author:** ![Terry44](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/terry44/32/175_2.png) [@Terry44](https://forum.pinegrow.com/u/Terry44)\
**Post date:** [July 23, 2017, 12:30am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/7 "2017-07-23T00:30:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ingenuitor](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@ingenuitor](https://forum.pinegrow.com/u/ingenuitor)\
**Post date:** [October 30, 2018, 3:01pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/8 "2018-10-30T15:01:28Z")

</div>

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>
```

---

<div class="post-metadata">

**Author:** ![Marf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/marf/32/1799_2.png) [@Marf](https://forum.pinegrow.com/u/Marf)\
**Post date:** [October 30, 2018, 3:34pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/9 "2018-10-30T15:34:09Z")

</div>

**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.
> 
> ![](https://yyz2.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/83dde4d37f66ead6882b022687115097c9badb81.jpeg)
> 
> 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:**

> **[Release 4.8 - 31 May, 2018 | Pinegrow Web Editor](https://pinegrow.com/release_notes/release-4-8-31-may-2018/)**
>
> Light UI Theme, keep custom HTML formatting, Font Awesome 5, better support for Google Fonts and WordPress improvements.

---

<div class="post-metadata">

**Author:** ![ingenuitor](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@ingenuitor](https://forum.pinegrow.com/u/ingenuitor)\
**Post date:** [October 30, 2018, 3:51pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/10 "2018-10-30T15:51:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ingenuitor](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@ingenuitor](https://forum.pinegrow.com/u/ingenuitor)\
**Post date:** [October 31, 2018, 10:22am UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/11 "2018-10-31T10:22:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/marf/32/1799_2.png) [@Marf](https://forum.pinegrow.com/u/Marf)\
**Post date:** [October 31, 2018, 12:51pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/12 "2018-10-31T12:51:22Z")

</div>

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

> **[Contact Us | Pinegrow Web Editor](https://pinegrow.com/contact-us/)**
>
> Ran into problems? Have a suggestion? We would love to hear from you!

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.

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)\
**Post date:** [October 31, 2018, 12:54pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/13 "2018-10-31T12:54:19Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Marf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/marf/32/1799_2.png) [@Marf](https://forum.pinegrow.com/u/Marf)\
**Post date:** [October 31, 2018, 1:05pm UTC](https://forum.pinegrow.com/t/how-to-keep-pinegrow-from-reformatting-my-code/379/14 "2018-10-31T13:05:11Z")

</div>

@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.
