# Prevent unwanted newlines from backslashes in code blocks

**URL:** <https://discourse.gohugo.io/t/prevent-unwanted-newlines-from-backslashes-in-code-blocks/34281>\
**Category:** support\
**Created:** [August 16, 2021, 3:24am UTC](https://discourse.gohugo.io/t/prevent-unwanted-newlines-from-backslashes-in-code-blocks/34281 "2021-08-16T03:24:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertmarkbram](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robertmarkbram/32/8508_2.png) [@robertmarkbram](https://discourse.gohugo.io/u/robertmarkbram)\
**Post date:** [August 16, 2021, 3:24am UTC](https://discourse.gohugo.io/t/prevent-unwanted-newlines-from-backslashes-in-code-blocks/34281/1 "2021-08-16T03:24:01Z")

</div>

Hello,

My Hugo version:

```auto
$ hugo env
Hugo Static Site Generator v0.62.1-A1518704 windows/amd64 BuildDate: 2020-01-01T17:39:35Z
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.13.4"

```

I have some mark down like:

> Get a dump of the DB.
> 
> ```bash
> mysqldump \
> --single-transaction \
> --quick \
> --lock-tables=false \
> --routines \
> --triggers \
> -d lsservdcato > /tmp/xxx.schema.sql
> 
> ```

So the back-slashes there are part of the bash script command, but when rendered in Hugo, it is both displaying the backslashes and adding unwanted new lines, as per the image below:

 ![hugo-code-block](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/2/28785897b59c9275ec72a553cd624b227a647862.png)

Is there a setting to stop this?

Rob  
🙂

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [August 16, 2021, 5:41am UTC](https://discourse.gohugo.io/t/prevent-unwanted-newlines-from-backslashes-in-code-blocks/34281/2 "2021-08-16T05:41:40Z")

</div>

Hi there,

I tested your snippet in my local Hugo site and I don’t see those extra newlines. Do you have your code in a repo somewhere we can have a look at to replicate?
