# I lose indentation, or gain extra newlines

**URL:** https://discourse.cmake.org/t/i-lose-indentation-or-gain-extra-newlines/15415
**Category:** Site Feedback
**Created:** [December 21, 2025, 8:28pm UTC](https://discourse.cmake.org/t/i-lose-indentation-or-gain-extra-newlines/15415 "2025-12-21T20:28:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Joymaker](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@Joymaker](https://discourse.cmake.org/u/Joymaker)
#### Post date: [December 21, 2025, 8:28pm UTC](https://discourse.cmake.org/t/i-lose-indentation-or-gain-extra-newlines/15415/1 "2025-12-21T20:28:13Z")

</div>

Using this forum just now, I discovered a strange thing. First of all, here’s my environment: I’m running Visual Studio on Windows in a virtual machine under Parallels under Mac OS. I can run my browser, DuckDuckGo, on Windows or Mac.

Now, the weirdness: if I copy code from Visual Studio (or Notepad) and paste it into a new topic on this forum on the Mac, indentation is preserved but every newline turns into two new lines, so everything is doublespaced. If I instead paste it into a new topic on this forum under Windows, I get single spacing but indentation is destroyed: all leading spaces or tabs are lost. (In the original, they are in fact spaces.)

Are these issues understood? Is there a way to do better?

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [January 6, 2026, 7:09pm UTC](https://discourse.cmake.org/t/i-lose-indentation-or-gain-extra-newlines/15415/2 "2026-01-06T19:09:44Z")

</div>

Message composition on this forum uses “Markdown” syntax. The simplest way to preserve code is triple-backtick fences. For example, the markdown source:

````md
```
int main(void)
{
  return 0;
}
```

````

renders as:

```auto
int main(void)
{
  return 0;
}

```

There are many markdown tutorials on the web.
