# How to break a command into multiple lines for alignment?

**URL:** <https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559>\
**Category:** support\
**Created:** [October 31, 2019, 7:12pm UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559 "2019-10-31T19:12:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nader\_K\_Rad](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nader_k_rad/32/7676_2.png) [@Nader\_K\_Rad](https://discourse.gohugo.io/u/Nader_K_Rad)\
**Post date:** [October 31, 2019, 7:12pm UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559/1 "2019-10-31T19:12:00Z")

</div>

I’ve got a code like this:

```
{{ partial "show-product.html" (dict "param1" "value1" "p2" "v2" "lastp" (slice "a1" "a2" "a3" ) ) }}

```

Which is hard to read. What I really like to do is to format it like this:

```
{{ partial 
    "show-product.html" 
    (dict 
        "param1" "value1" 
        "p2" "v2" 
        "lastp" (slice 
                      "a1" 
                      "a2" 
                      "a3"
                  ) 
    ) 
}}

```

… which gives me an error. Is there a way to break a command into multiple lines?

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [November 1, 2019, 12:44pm UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559/2 "2019-11-01T12:44:58Z")

</div>

You could try to add a \ (backslash) before the line break - I just thought of that, never tested it. But I think it’s not possible to break up a tag on multiple lines.

By the way: why not using param1=“value1” param2=“value2” param3=“a1 a2 a3” and then exploding the third parameter in your shortcode?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 1, 2019, 2:02pm UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559/3 "2019-11-01T14:02:53Z")

</div>

> <https://github.com/golang/go/issues/29770>
>
> This issue resurfaced in gohugoio/hugo#5604 -- but has been mentioned enough times to have proven its value.
> In Hugo we have many...

---

<div class="post-metadata">

**Author:** ![Nader\_K\_Rad](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nader_k_rad/32/7676_2.png) [@Nader\_K\_Rad](https://discourse.gohugo.io/u/Nader_K_Rad)\
**Post date:** [November 2, 2019, 3:11pm UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559/4 "2019-11-02T15:11:55Z")

</div>

So, that’s a no for now 🙂

For my current case, because the possible combinations of data are limited, I’ve created a data file and instead of sending all those values to the partial, I just send one element of that data file.

---

<div class="post-metadata">

**Author:** ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)\
**Post date:** [September 11, 2020, 12:48am UTC](https://discourse.gohugo.io/t/how-to-break-a-command-into-multiple-lines-for-alignment/21559/5 "2020-09-11T00:48:45Z")

</div>

Took some time but 🎉

[https://go-review.googlesource.com/c/go/+/254257/](https://go-review.googlesource.com/c/go/+/254257/)
