# Posting code looks different even when using ticks

**URL:** <https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176>\
**Category:** Meta\
**Created:** [20 June 2022 16:30 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176 "2022-06-20T16:30:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [20 June 2022 16:30 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/1 "2022-06-20T16:30:15Z")

</div>

I don't post a lot of code to the forum but I noticed that when I did today it looks different now. As I recall the entire code would be compressed to a single line before but now it is much larger. Did something change or am I hallucinating again?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 June 2022 16:42 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/2 "2022-06-20T16:42:28Z")

</div>

> or am I hallucinating again?

Its been a tough few years for us all 😉  
I usually add the 3 backticks my self and add a type, and then paste my JS code between them.

```javascript
/* My JS Code */
function hallucinate(){
...
}

```

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a6312fdddd6b64d8c2c14009da11c6a24e8c37c3.png)

As for JSON, no different other than ensuring its been formatted - else it may have no line breaks, indentation.

I don't use the code formatting option on the post editor.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 June 2022 16:52 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/3 "2022-06-20T16:52:01Z")

</div>

Gerry are you exporting the code compact or formatted? if you select compact(newlines and carriage returns etc removed) you get one line. Setting in export window when view json in text form.

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [20 June 2022 18:51 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/4 "2022-06-20T18:51:41Z")

</div>

Brilliant!!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 June 2022 20:00 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/5 "2022-06-20T20:00:51Z")

</div>

> [@marcus-j-davies](#):
>
> I usually add the 3 backticks my self and add a type

I actually stopped adding the type in forum posts as I don't think all of the appropriate formats are loaded. I found that the results are worse with the type than without. I think this did change some time last year or maybe early this year.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 July 2022 20:01 UTC](https://discourse.nodered.org/t/posting-code-looks-different-even-when-using-ticks/64176/6 "2022-07-04T20:01:18Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
