# Multi-line code blocks not working

**URL:** <https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457>\
**Category:** About This Message Board\
**Created:** [December 14, 2017, 12:58am UTC](https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457 "2017-12-14T00:58:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [December 14, 2017, 12:58am UTC](https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457/1 "2017-12-14T00:58:08Z")

</div>

This is a test:

```auto

if (foo())
{
    bar();
}

```

The code shows up as a single line in the preview, except that the full block shows a bunch of extra linefeeds. I’m not sure yet how it’ll look as a real post.

**markn+** has the same problem in [this thread](http://boards.straightdope.com/sdmb/showthread.php?t=844650).

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [December 14, 2017, 12:59am UTC](https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457/2 "2017-12-14T00:59:26Z")

</div>

Ok, it definitely eats the newlines. And unlike the preview, it doesn’t show a bunch of empty lines at the end of the block. So the behavior is different, but both are wrong.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [December 14, 2017, 1:19am UTC](https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457/3 "2017-12-14T01:19:18Z")

</div>

**Moderator Action**

It works correctly using the old skin. It’s only broken in the new mobile skin.

I’ll make a note of it in the mobile skin thread and close this. If anyone has additional comments on this issue (or any other issue with the mobile skin), please put them in the mobile skin thread, which is here:

[http://boards.straightdope.com/sdmb/showthread.php?t=835598](http://boards.straightdope.com/sdmb/showthread.php?t=835598)

Thread closed.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [December 14, 2017, 1:20am UTC](https://boards.straightdope.com/t/multi-line-code-blocks-not-working/804457/4 "2017-12-14T01:20:19Z")

</div>

This problem only occurs in the new, mobile-friendly skin. If you’d prefer, you can switch back to the old skin. There’s a blue bar at the bottom of the page with a drop-down to select your style.
